[PATCH] D11073: Architectures for darwin need to be conditionalized based on the operating system.
Alexey Samsonov
vonosmas at gmail.com
Wed Jul 15 15:19:38 PDT 2015
samsonov added inline comments.
================
Comment at: cmake/Modules/AddCompilerRT.cmake:22
@@ -21,1 +21,3 @@
set(extra_cflags_${libname} ${DARWIN_${os}_CFLAGS})
+ set(extra_linkflags_${libname} ${DARWIN_${os}_LINKFLAGS})
+ set(LIB_ARCHS_${libname} ${SANITIZER_COMMON_DARWIN_${os}_ARCHES})
----------------
This linkflags change seem to be unrelated. Also, link flags makes no sense for CMake object libraries, which are essentially collections of ".o" files. Why do you need this?
================
Comment at: cmake/Modules/AddCompilerRT.cmake:23
@@ -22,1 +22,3 @@
+ set(extra_linkflags_${libname} ${DARWIN_${os}_LINKFLAGS})
+ set(LIB_ARCHS_${libname} ${SANITIZER_COMMON_DARWIN_${os}_ARCHES})
endforeach()
----------------
This doesn't look good - you essentially discard "ARCHS" argument of this function. See another comment - you might have to *restrict* the set passed in LIB_ARCHS, given architectures you can target on ${os}, but you still need to respect it.
================
Comment at: lib/asan/CMakeLists.txt:116
@@ -115,3 +115,3 @@
add_compiler_rt_darwin_dynamic_runtime(clang_rt.asan_${os}_dynamic ${os}
- ARCHS ${ASAN_SUPPORTED_ARCH}
+ ARCHS ${SANITIZER_COMMON_DARWIN_${os}_ARCHES}
SOURCES $<TARGET_OBJECTS:RTAsan.${os}>
----------------
I still think you should calculate set intersection of architectures supported by a given sanitizer, and architectures that we can target on specific OS.
http://reviews.llvm.org/D11073
More information about the llvm-commits
mailing list