build-libcxx: Stop manually defining _LIBCPP_BUILDING_LIBRARY
Since before the LLVM 12.x branch, these aren't necessary any longer. (9c30bafd59bf1078bbe1c235c7c25bf7e278e2e9 and 8a73aa8c4c3ee82e7d650c6a957937713a4a9ab4 in llvm-project) Since 9c30bafd59bf1078bbe1c235c7c25bf7e278e2e9 in llvm-project, libcxxabi unconditionally defines _LIBCPP_BUILDING_LIBRARY while building. Since 8a73aa8c4c3ee82e7d650c6a957937713a4a9ab4 in llvm-project, libcxx defines _LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS if LIBCXX_ENABLE_STATIC_ABI_LIBRARY is set.
This commit is contained in:
1 parent
459e37f03f
commit
b37483cec5
1 file changed
+2
-9
+2
-9
@@ -135,7 +135,7 @@ build_all() {
|
|||||||
if [ "$type" = "shared" ]; then
|
if [ "$type" = "shared" ]; then
|
||||||
LIBCXX_VISIBILITY_FLAGS="-D_LIBCXXABI_BUILDING_LIBRARY"
|
LIBCXX_VISIBILITY_FLAGS="-D_LIBCXXABI_BUILDING_LIBRARY"
|
||||||
else
|
else
|
||||||
LIBCXX_VISIBILITY_FLAGS="-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS"
|
LIBCXX_VISIBILITY_FLAGS=""
|
||||||
fi
|
fi
|
||||||
cmake \
|
cmake \
|
||||||
${CMAKE_GENERATOR+-G} "$CMAKE_GENERATOR" \
|
${CMAKE_GENERATOR+-G} "$CMAKE_GENERATOR" \
|
||||||
@@ -181,14 +181,7 @@ build_all() {
|
|||||||
mkdir -p build-$arch-$type
|
mkdir -p build-$arch-$type
|
||||||
cd build-$arch-$type
|
cd build-$arch-$type
|
||||||
if [ "$type" = "shared" ]; then
|
if [ "$type" = "shared" ]; then
|
||||||
# Define _LIBCPP_BUILDING_LIBRARY, to an empty string to match
|
LIBCXXABI_VISIBILITY_FLAGS="-U_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS"
|
||||||
# cases in source files that also do
|
|
||||||
# "#define _LIBCPP_BUILDING_LIBRARY". Since Nov 3 2020, libcxxabi
|
|
||||||
# itself also defines this, but with a plain
|
|
||||||
# -D_LIBCPP_BUILDING_LIBRARY, which defines it to 1. Therefore,
|
|
||||||
# first undefine any potential existing define from the command
|
|
||||||
# line, to avoid conflicts.
|
|
||||||
LIBCXXABI_VISIBILITY_FLAGS="-U_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_BUILDING_LIBRARY= -U_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS"
|
|
||||||
else
|
else
|
||||||
LIBCXXABI_VISIBILITY_FLAGS=""
|
LIBCXXABI_VISIBILITY_FLAGS=""
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in new issue
Block a user