[PATCH] D53868: Build with -fvisibility=hidden

Louis Dionne via Phabricator reviews at reviews.llvm.org
Tue Oct 30 09:29:14 PDT 2018


ldionne added a comment.

I think what I would prefer is a patch that fixes the build with `-fvisiblity=hidden` on Linux using source-level annotations without actually building with `-fvisibility=hidden`. This can be done by using either `_LIBCPP_EXPORTED_FROM_ABI` if the thing should be visible, or mark it as hidden if it shouldn't.

Once this is done and libc++ works properly with inline visibility on Linux and MacOS, we can switch the namespace-scope attribute to make everything hidden _and_ fixup the macros that need to account for the change in default.



================
Comment at: lib/abi/CHANGELOG.TXT:27
+
+  x86_64-linux-gnu
+  ----------------
----------------
Why are we removing any symbols from the dylib? With the previous change I made, I already fixed the ABI lists and I assumed it would work just the same on Linux. Did the `check-cxx-abilist` fail on Linux when applying `-fvisibility=hidden` even after my patch?


Repository:
  rCXX libc++

https://reviews.llvm.org/D53868





More information about the libcxx-commits mailing list