This is an archive of the discontinued LLVM Phabricator instance.

[BOLT] Fix (part of) dylib compatibility
ClosedPublic

Authored by serge-sans-paille on Sep 20 2022, 5:48 AM.

Details

Diff Detail

Event Timeline

Herald added a reviewer: Amir. · View Herald Transcript
Herald added a reviewer: maksfb. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
serge-sans-paille requested review of this revision.Sep 20 2022, 5:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptSep 20 2022, 5:48 AM
rafauler requested changes to this revision.Sep 20 2022, 11:16 AM

Thanks for working on fixing this! The llvm-bolt-fuzzer target doesn't seem quite right, could you take a look?

bolt/tools/llvm-bolt-fuzzer/CMakeLists.txt
2

This is basically the only link from llvm-bolt-fuzzer with BOLT. We need to link it somehow. Using this diff, it fails to build for me with:

ld.lld: error: undefined symbol: opts::OutputFilename[abi:cxx11]

referenced by llvm-bolt-fuzzer.cpp:25 (/home/rafaelauler/server-llvm/llvm/llvm-project/bolt/tools/llvm-bolt-fuzzer/llvm-bolt-fuzzer.cpp:25)

tools/bolt/tools/llvm-bolt-fuzzer/CMakeFiles/llvm-bolt-fuzzer.dir/llvm-bolt-fuzzer.cpp.o:(LLVMFuzzerTestOneInput)

To test a fuzzer target, remember to add these two options to cmake:

-DLLVM_USE_SANITIZER=Address
-DLLVM_USE_SANITIZE_COVERAGE=On
This revision now requires changes to proceed.Sep 20 2022, 11:16 AM

@rafaelauler another try, this passes build with sanitizer off, haven't tried yet with sanitizer on.

rafauler added inline comments.Sep 20 2022, 12:54 PM
bolt/tools/llvm-bolt-fuzzer/CMakeLists.txt
10
Amir added a comment.Sep 20 2022, 12:55 PM

Thank you for fixing that! Can you please retitle as "[BOLT]"?

serge-sans-paille retitled this revision from [bolt] Fix (part of) dylib compatibility to [BOLT] Fix (part of) dylib compatibility.

Address reviewers' comments

serge-sans-paille marked an inline comment as done.Sep 21 2022, 12:19 AM
rafauler accepted this revision.Sep 21 2022, 11:41 AM
This revision is now accepted and ready to land.Sep 21 2022, 11:41 AM
This revision was landed with ongoing or failed builds.Sep 22 2022, 1:33 AM
This revision was automatically updated to reflect the committed changes.