ROCm / ROCT-Thunk-Interface

ROCm's Thunk Interface
Other
83 stars 71 forks source link

kfdtest: link llvm dynamic lib; fix hsaKmtCheckRuntimeDebugSupport visibility #102

Closed littlewu2508 closed 3 months ago

littlewu2508 commented 6 months ago
  1. Distros like Gentoo use dynamic libLLVM.so instead of separated, static llvm component libs. Add a switch to choose linking libLLVM.so.

  2. kfdtest cannot be built due to:

mold: error: undefined symbol: hsaKmtCheckRuntimeDebugSupport                                                                                                                                                      
>>> referenced by KFDDBGTest.cpp                                                                                                                                                                                   
>>>               CMakeFiles/kfdtest.dir/src/KFDDBGTest.cpp.o:(KFDDBGTest_AttachToSpawnedProcess_Test::TestBody())>>> referenced by KFDDBGTest.cpp
>>>               CMakeFiles/kfdtest.dir/src/KFDDBGTest.cpp.o:(KFDDBGTest_AttachToRunningProcess_Test::TestBody())>>> referenced by KFDDBGTest.cpp
>>>               CMakeFiles/kfdtest.dir/src/KFDDBGTest.cpp.o:(KFDDBGTest_HitTrapEvent_Test::TestBody())>>> referenced 4 more times

collect2: error: ld returned 1 exit status

Turns out hsaKmtCheckRuntimeDebugSupport is a hidden symbol. Fix that to make kfdtest build successfully

kentrussell commented 6 months ago

We've merged this in and it should be out in 6.2

AngryLoki commented 3 months ago

Looks like this PR was merged successfully and can be closed.

littlewu2508 commented 3 months ago

Thank you!