This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Support for passing through linker flags to libc++ build
ClosedPublic

Authored by phosek on Nov 2 2018, 12:38 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

phosek created this revision.Nov 2 2018, 12:38 AM
Herald added subscribers: Restricted Project, llvm-commits, mgorny, dberris. · View Herald Transcript

Feel free to ignore me.. but would be glad if you happen to know the cause. ninja -C ~/llvm/Release TFuzzer-x86_64-Test appears to be broken to me due to some cmake change landed yesterday

ld.lld: error: undefined symbol: fuzzer::ParseOneDictionaryEntry(std::__Fuzzer::basic_string<char, std::__Fuzzer::char_traits<char>, std::__Fuzzer::allocator<char> > const&, std::__Fuzzer::vector<unsigned char, fuzzer::fuzzer_allocator<unsigned char> >*)
>>> referenced by FuzzerUnittest.cpp
>>>               FuzzerTestObjects.FuzzerUnittest.cpp.x86_64.o:(FuzzerDictionary_ParseOneDictionaryEntry_Test::TestBody())

The issue is that projects/compiler-rt/lib/fuzzer/CMakeFiles/RTfuzzer.x86_64.dir/FuzzerUtil.cpp.o has (incorrect) hidden symbols.

64: 0000000000000000  2175 FUNC    GLOBAL HIDDEN    19 fuzzer::ParseOneDictionaryEntry(std::Fuzzer::basic_string<char, std::Fuzzer::char_traits<char>, std::Fuzzer::allocator<char> > const&, std::Fuzzer::vector<unsigned char, fuzzer::fuzzer_allocator<unsigned char> >*)

A quick (and improper) fix is to delete -fvisibility=hidden on compiler-rt/lib/fuzzer/CMakeLists.txt#L128.

vitalybuka accepted this revision.Nov 2 2018, 10:19 AM
This revision is now accepted and ready to land.Nov 2 2018, 10:19 AM
eugenis requested changes to this revision.Nov 2 2018, 10:45 AM
eugenis added a subscriber: eugenis.

The same failure as MaskRay describes has kept sanitizer-linux bot red for several days now:
http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/17090

This revision now requires changes to proceed.Nov 2 2018, 10:45 AM

I'm looking into that issue now, although that's independent from this change.

phosek added a comment.Nov 2 2018, 4:22 PM

D54058 is a fix for the broken bot build. I've decided to keep that change separate since it's independent from this change.

phosek added a comment.Nov 2 2018, 4:49 PM

Is it OK to land this now that D54058 has landed?

eugenis accepted this revision.Nov 2 2018, 5:30 PM

Yes, thanks you! LGTM

This revision is now accepted and ready to land.Nov 2 2018, 5:30 PM
This revision was automatically updated to reflect the committed changes.