LDC PGO on Windows

Imperatorn johan_forsberg_86 at hotmail.com
Mon Oct 16 17:43:21 UTC 2023


On Monday, 16 October 2023 at 17:13:04 UTC, Imperatorn wrote:
> On Monday, 16 October 2023 at 17:00:41 UTC, Imperatorn wrote:
>> Does PGO work on Windows with LDC?
>>
>> If so, how do I use it? Been trying to follow the information 
>> available but get various errors related to linker or runtime 
>> errors.
>>
>> Is it supported on Windows?
>>
>> Thanks
>
> With msvc I get
> unresolved external symbol llvm_profile_instrument_target 
> referenced in function _D4hash7keynode9xtoHashFNbNeKxSQBfQBdZm
> unresolved external symbol llvm_profile_runtime referenced in 
> function llvm_profile_runtime_user
>
> And with link-internally I get
> lld-link: error: undefined symbol: llvm_profile_runtime
> lld-link: error: undefined symbol: 
> llvm_profile_instrument_target

I get the same on Linux:
undefined reference to `__llvm_profile_instrument_target'

And trying a minimal example gives me:

Exception Code: 0xC000001D
0x00007FF603511EDE, C:\Program Files\LDC 
1.35\bin\ldc2.exe(0x00007FF600310000) + 0x3201EDE byte(s)
0x00007FF60318F052, C:\Program Files\LDC 
1.35\bin\ldc2.exe(0x00007FF600310000) + 0x2E7F052 byte(s)
0x00007FF6032A01DA, C:\Program Files\LDC 
1.35\bin\ldc2.exe(0x00007FF600310000) + 0x2F901DA byte(s)
0x00007FF60329FE2F, C:\Program Files\LDC 
1.35\bin\ldc2.exe(0x00007FF600310000) + 0x2F8FE2F byte(s)
0x00007FF6032A0135, C:\Program Files\LDC 
1.35\bin\ldc2.exe(0x00007FF600310000) + 0x2F90135 byte(s)
0x00007FF6031884DD, C:\Program Files\LDC 
1.35\bin\ldc2.exe(0x00007FF600310000) + 0x2E784DD byte(s)
0x00007FF60353F4C4, C:\Program Files\LDC 
1.35\bin\ldc2.exe(0x00007FF600310000) + 0x322F4C4 byte(s)
0x00007FFF17AB7344, 
C:\windows\System32\KERNEL32.DLL(0x00007FFF17AA0000) + 0x17344 
byte(s), BaseThreadInitThunk() + 0x14 byte(s)
0x00007FFF18F426B1, 
C:\windows\SYSTEM32\ntdll.dll(0x00007FFF18EF0000) + 0x526B1 
byte(s), RtlUserThreadStart() + 0x21 byte(s)


More information about the Digitalmars-d mailing list