This is an archive of the discontinued LLVM Phabricator instance.

[CMake][clang] add_clang_library's functions require default visibility
Needs ReviewPublic

Authored by radford on Apr 20 2021, 3:26 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,libclang.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:26 PM
radford requested review of this revision.Apr 20 2021, 3:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 20 2021, 3:26 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript