[Numpy-discussion] Combined versus separate build
Mon Jul 2 18:29:26 CDT 2012
On Mon, Jul 2, 2012 at 11:34 PM, Nathaniel Smith <email@example.com> wrote:
> To be clear, this subthread started with the caveat *as far as our
> "officially supported" platforms go* -- I'm not saying that we should
> go around and remove all the NPY_NO_EXPORT macros tomorrow.
> However, the only reason they're actually needed is for supporting
> platforms where you can't control symbol visibility from the linker,
> and AFAICT we have no examples of such platforms to hand.
I gave you one, mingw 3.x. Actually, reading a bit more around, it
seems this is not specific to mingw, but all gcc < 4
> I don't have windows to test, but everyone else on the internet seems
> to think mingw works the way I said, with __declspec and all... you
> aren't thinking of cygwin, are you? (see e.g.
Well, I did check myself, but looking more into it, I was tricked by
nm output, which makes little sense on windows w.r.t. visibility with
dll. You can define the same function in multiple dll, they will all
appear as a public symbol (T label with nm), but the windows linker
will not see them when linking for an executable.
I am still biased toward the conservative option, especially that it
is still followed by pretty much every C extension out there
(including python itself). I trust their experience in dealing with
cross platform more than ours.
I cannot find my patch for detecting platforms where this can safely
become the default, I will reprepare one.
More information about the NumPy-Discussion