lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <mar...@rectangular.com>
Subject Re: [lucy-dev] Sample extension for Lucy
Date Fri, 27 Apr 2012 21:26:38 GMT
On Fri, Apr 27, 2012 at 10:13 AM, Nick Wellnhofer <wellnhofer@aevum.de> wrote:
> The WhitespaceTokenizer extension works on ActivePerl/MSVC but we'll have to
> keep using cf_linker_flags. This will also be the case for other Perls on
> Windows, since the dynamic linker is part of the OS.
>
> So I propose we switch to DynaLoader with dl_load_flags (this also helps
> with the other XSLoader problem) and keep cf_linker_flags. It can simply
> return an empty array on every platform but Windows.

+1

Glad to hear that moving to DynaLoader kills two birds with one stone!

I was initially concerned that we might end up creating fragile extensions on
Windows, but I'm reassured after snooping the code in
Clownfish::CFC::Perl::Build and reading this:

    http://xenophilia.org/winvunix.html

    In Windows, building A.dll will also build A.lib. You *do* pass A.lib to
    the linker for B and C. A.lib does not contain code; it just contains
    information which will be used at runtime to access A's code.

I assume that the extension does not need to be rebuilt if A.dll and A.lib are
updated, so long as they only change in ways that don't break A's ABI.

Marvin Humphrey

Mime
View raw message