[Issue 24340] New: Invalid export directives generated

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 15 18:21:11 UTC 2024


https://issues.dlang.org/show_bug.cgi?id=24340

          Issue ID: 24340
           Summary: Invalid export directives generated
           Product: D
           Version: D2
          Hardware: All
                OS: Windows
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: alphaglosined at gmail.com

I'm testing Rainer's freshly pulled shared library PR.

It is not linking with visibility turned on to public.

I am getting invalid export directives being generated. Of note:

```
  
/EXPORT:_D4core8internal8lifetime__T10emplaceRefTS6sidero4base10containers13readonlyslice__T5SliceThZQj8IteratorTQCmTiTSQCsQCo10allocators3api11RCAllocatorTAxhZQEuFKQEmKiKQCaKQtZ1S__T6__ctorZQiMFNaNbNcNiNfKiKQDlKQCeZSQHzQHxQHr__TQHlTQHcTQHgTiTQEuTQDnZQIhFKQHzKiKQFnKQEgZQDo
   /EXPORT:
   /EXPORT:_D6object__T10RTInfoImplVAmA3i592i5063812098665367111i70ZQBtyG3m
  
/EXPORT:_D4core8internal5array8equality__T8__equalsTtTiZQoFNaNbNiNeMxAtMxAiZb
   /EXPORT:_D4core8internal5array8equality__T7isEqualTtTiZQnFNaNbNiMxPtMxPimZb
   /EXPORT:_D6object__T10RTInfoImplVAmA2i336i301826721351ZQBjyG2m
   /EXPORT:_D6object__T10RTInfoImplVAmA2i208i4605511ZQBeyG2m
   /EXPORT:n
   wP
   /EXPORT:n
   wð
  
/EXPORT:_D6object__T10RTInfoImplVAmA9i3920i5063812098665367111i5063812098665367110i5063812098665367110i5063812098665367110i5063812098665367110i5063812098665367110i5063812098665367110i301826721350ZQGuyG9m
```

The other ~30k exports look ok.

Error:

```
sidero_base-test-unittest.obj : fatal error LNK1276: invalid directive 'wP'
found; does not start with '/'
Error: linker exited with status 1276
       C:\Program Files\Microsoft Visual
Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX64\x64\link.exe
/NOLOGO
"C:\Users\alpha\AppData\Local\dub\cache\sidero_base\~master\build\sidero_base-test-unittest-unittest-f2Z24g5qpSiOgu5uMwz-ZA\sidero_base-test-unittest.obj"
/OUT:"C:\Users\alpha\AppData\Local\dub\cache\sidero_base\~master\build\sidero_base-test-unittest-unittest-f2Z24g5qpSiOgu5uMwz-ZA\sidero_base-test-unittest.exe"
 /DEFAULTLIB:"Ws2_32.lib" /DEFAULTLIB:"advapi32.lib" /DEFAULTLIB:"Userenv.lib"
/DEFAULTLIB:phobos64 /DEBUG /IGNORE:4217 /FORCE:MULTIPLE  /LIBPATH:"C:\Program
Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\lib\x64"
legacy_stdio_definitions.lib /LIBPATH:"C:\Program Files (x86)\Windows
Kits\10\Lib\10.0.20348.0\ucrt\x64" /LIBPATH:"C:\Program Files (x86)\Windows
Kits\10\lib\10.0.20348.0\um\x64"
```

Directives were dumped via MSVC ``dumpbin /DIRECTIVES
sidero_base-test-unittest.obj > directives.txt 2>&1``

--


More information about the Digitalmars-d-bugs mailing list