[compiler-rt] r331922 - [CMake] Build shared version of runtimes for Fuchsia
Petr Hosek via llvm-commits
llvm-commits at lists.llvm.org
Wed May 9 14:24:06 PDT 2018
Author: phosek
Date: Wed May 9 14:24:06 2018
New Revision: 331922
URL: http://llvm.org/viewvc/llvm-project?rev=331922&view=rev
Log:
[CMake] Build shared version of runtimes for Fuchsia
Fuchsia is no longer treated as UNIX which means we need to explicitly
enable building of shared versions of runtimes.
Differential Revision: https://reviews.llvm.org/D46609
Modified:
compiler-rt/trunk/CMakeLists.txt
compiler-rt/trunk/lib/asan/CMakeLists.txt
compiler-rt/trunk/lib/hwasan/CMakeLists.txt
compiler-rt/trunk/lib/msan/CMakeLists.txt
compiler-rt/trunk/lib/profile/CMakeLists.txt
compiler-rt/trunk/lib/ubsan/CMakeLists.txt
compiler-rt/trunk/lib/ubsan_minimal/CMakeLists.txt
Modified: compiler-rt/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=331922&r1=331921&r2=331922&view=diff
==============================================================================
--- compiler-rt/trunk/CMakeLists.txt (original)
+++ compiler-rt/trunk/CMakeLists.txt Wed May 9 14:24:06 2018
@@ -278,6 +278,12 @@ else()
set(SANITIZER_LIMIT_FRAME_SIZE FALSE)
endif()
+if(FUCHSIA OR UNIX)
+ set(SANITIZER_USE_SYMBOLS TRUE)
+else()
+ set(SANITIZER_USE_SYMBOLS FALSE)
+endif()
+
# Build sanitizer runtimes with debug info.
if(MSVC)
# Use /Z7 instead of /Zi for the asan runtime. This avoids the LNK4099
Modified: compiler-rt/trunk/lib/asan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/CMakeLists.txt?rev=331922&r1=331921&r2=331922&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/asan/CMakeLists.txt Wed May 9 14:24:06 2018
@@ -227,7 +227,7 @@ else()
DEFS ${ASAN_DYNAMIC_DEFINITIONS}
PARENT_TARGET asan)
- if (UNIX AND NOT ${arch} STREQUAL "i386")
+ if (SANITIZER_USE_SYMBOLS AND NOT ${arch} STREQUAL "i386")
add_sanitizer_rt_symbols(clang_rt.asan_cxx
ARCHS ${arch})
add_dependencies(asan clang_rt.asan_cxx-${arch}-symbols)
Modified: compiler-rt/trunk/lib/hwasan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/hwasan/CMakeLists.txt?rev=331922&r1=331921&r2=331922&view=diff
==============================================================================
--- compiler-rt/trunk/lib/hwasan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/hwasan/CMakeLists.txt Wed May 9 14:24:06 2018
@@ -131,7 +131,7 @@ foreach(arch ${HWASAN_SUPPORTED_ARCH})
DEFS ${ASAN_DYNAMIC_DEFINITIONS}
PARENT_TARGET hwasan)
- if(UNIX)
+ if(SANITIZER_USE_SYMBOLS)
add_sanitizer_rt_symbols(clang_rt.hwasan
ARCHS ${arch}
EXTRA hwasan.syms.extra)
Modified: compiler-rt/trunk/lib/msan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/CMakeLists.txt?rev=331922&r1=331921&r2=331922&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/msan/CMakeLists.txt Wed May 9 14:24:06 2018
@@ -54,7 +54,7 @@ foreach(arch ${MSAN_SUPPORTED_ARCH})
PARENT_TARGET msan)
list(APPEND MSAN_RUNTIME_LIBRARIES clang_rt.msan-${arch}
clang_rt.msan_cxx-${arch})
- if(UNIX)
+ if(SANITIZER_USE_SYMBOLS)
add_sanitizer_rt_symbols(clang_rt.msan
ARCHS ${arch}
EXTRA msan.syms.extra)
Modified: compiler-rt/trunk/lib/profile/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/profile/CMakeLists.txt?rev=331922&r1=331921&r2=331922&view=diff
==============================================================================
--- compiler-rt/trunk/lib/profile/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/profile/CMakeLists.txt Wed May 9 14:24:06 2018
@@ -68,7 +68,7 @@ if(WIN32)
list(APPEND PROFILE_SOURCES WindowsMMap.c)
endif()
-if(UNIX)
+if(FUCHSIA OR UNIX)
set(EXTRA_FLAGS
-fPIC
-Wno-pedantic)
Modified: compiler-rt/trunk/lib/ubsan/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/CMakeLists.txt?rev=331922&r1=331921&r2=331922&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/ubsan/CMakeLists.txt Wed May 9 14:24:06 2018
@@ -173,7 +173,7 @@ else()
CFLAGS ${UBSAN_CXXFLAGS}
PARENT_TARGET ubsan)
- if (UNIX)
+ if (FUCHSIA OR UNIX)
add_compiler_rt_runtime(clang_rt.ubsan_standalone
SHARED
ARCHS ${UBSAN_SUPPORTED_ARCH}
Modified: compiler-rt/trunk/lib/ubsan_minimal/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan_minimal/CMakeLists.txt?rev=331922&r1=331921&r2=331922&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan_minimal/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/ubsan_minimal/CMakeLists.txt Wed May 9 14:24:06 2018
@@ -44,7 +44,7 @@ if(COMPILER_RT_HAS_UBSAN_MINIMAL)
LINK_LIBS ${UBSAN_DYNAMIC_LIBS}
PARENT_TARGET ubsan-minimal)
- if (UNIX AND NOT APPLE)
+ if (SANITIZER_USE_SYMBOLS AND NOT APPLE)
set(ARCHS_FOR_SYMBOLS ${UBSAN_SUPPORTED_ARCH})
list(REMOVE_ITEM ARCHS_FOR_SYMBOLS i386 i686)
add_sanitizer_rt_symbols(clang_rt.ubsan_minimal
More information about the llvm-commits
mailing list