This is an archive of the discontinued LLVM Phabricator instance.

[CMake][llvm] add_llvm_library's functions require default visibility
Needs ReviewPublic

Authored by radford on Apr 20 2021, 3:30 PM.

Details

Reviewers
arphaman
Summary

Compiling LLVM, as a cmake sub-project that compiles with visibility
hidden, will generate a "cannot export hidden symbol" error because we
require default visibility. Even though we export using
-Wl,-exported_symbols_list,libllvm.exports, if each .cpp file is
compiled with -fvisibility=hidden, then you'll get this warning and
linking will fail. Essentially -exported_symbols_list is not strong
enough to reverse the -fvisibility=hidden.

Diff Detail

Event Timeline

radford created this revision.Apr 20 2021, 3:30 PM
radford requested review of this revision.Apr 20 2021, 3:30 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2021, 3:30 PM