• Kirill Smelkov's avatar
    *: Fix dll export annotation everywhere · 0ffef2d8
    Kirill Smelkov authored
    We already try to annotate functions exported from DSOs as such.
    However so far we were testing only on Linux and macOS where
    -fvisibility=hidden is not the default, and thus linker forgives us
    annotation mistakes. But on Windows the default is to have hidden
    visibility out of the box and so the linker becomes strict about this.
    
    -> Fix all issues caught there.
    
    For example here is how it breaks if ~_interface() is not annotated properly:
    
        building 'golang.runtime.libpyxruntime' DSO as build\lib.win-amd64-cpython-310\golang\runtime\libpyxruntime.dll
        ...
        Z:\home\kirr\src\tools\go\pygo-win\BuildTools\vc\tools\msvc\14.35.32215\bin\Hostx64\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO "/LIBPATH:C:\Program Files\Python310\li
        bs" /LIBPATH:build\lib.win-amd64-cpython-310\golang\runtime /LIBPATH:z:\home\kirr\src\tools\go\pygo-win\BuildTools\vc\tools\msvc\14.35.32215\lib\x64 /LIBPATH:z:\home\kirr\src\tools\go\pygo-win\Bu...
    0ffef2d8
runtime.h 3.96 KB