summaryrefslogtreecommitdiff
path: root/lib/asan/CMakeLists.txt
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-02-08 20:43:39 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-02-08 20:43:39 +0000
commit76ca11dcce7f2754776a80a39521edbc21a8643a (patch)
treeb3e9fd8ce4264f95a74220966d92eed13c41556c /lib/asan/CMakeLists.txt
parent8be6460a9151b99a8a71804ff6ec68297fa1f07e (diff)
build: repair cross-compilation with clang
When building for Windows, we would check if we were using MSVC rather than WIN32. This resulted in needed targets not being defined by sanitizer_common. Fix the conditional. When registering the objects libraries for ASAN, we would multiply register for all targets as we were creating them inside a loop over all architectures. Only define the target per architecture. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@294510 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/CMakeLists.txt')
-rw-r--r--lib/asan/CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/asan/CMakeLists.txt b/lib/asan/CMakeLists.txt
index aec11dff7..78a504cfa 100644
--- a/lib/asan/CMakeLists.txt
+++ b/lib/asan/CMakeLists.txt
@@ -180,7 +180,7 @@ else()
if (MSVC)
add_compiler_rt_object_libraries(AsanWeakInterception
${SANITIZER_COMMON_SUPPORTED_OS}
- ARCHS ${ASAN_SUPPORTED_ARCH}
+ ARCHS ${arch}
SOURCES asan_win_weak_interception.cc
CFLAGS ${ASAN_CFLAGS} -DSANITIZER_DYNAMIC
DEFS ${ASAN_COMMON_DEFINITIONS})
@@ -223,7 +223,7 @@ else()
if (WIN32)
add_compiler_rt_object_libraries(AsanDllThunk
${SANITIZER_COMMON_SUPPORTED_OS}
- ARCHS ${ASAN_SUPPORTED_ARCH}
+ ARCHS ${arch}
SOURCES asan_globals_win.cc
asan_win_dll_thunk.cc
CFLAGS ${ASAN_CFLAGS} -DSANITIZER_DLL_THUNK
@@ -248,7 +248,7 @@ else()
add_compiler_rt_object_libraries(AsanDynamicRuntimeThunk
${SANITIZER_COMMON_SUPPORTED_OS}
- ARCHS ${ASAN_SUPPORTED_ARCH}
+ ARCHS ${arch}
SOURCES asan_globals_win.cc
asan_win_dynamic_runtime_thunk.cc
CFLAGS ${ASAN_CFLAGS} ${DYNAMIC_RUNTIME_THUNK_CFLAGS}