[PATCH] D12174: [CMake] Fix building unit tests on Darwin

Filipe Cabecinhas via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 16:27:03 PDT 2015


filcab added a comment.

Thanks a lot!


================
Comment at: cmake/Modules/CompilerRTDarwinUtils.cmake:83
@@ +82,3 @@
+# and later machines can run x86_64h binaries. Haswell is cpusubtype 8.
+function(filter_host_archs input output)
+  list_union(tmp_var DARWIN_osx_ARCHS ${input})
----------------
Since this function is Darwin-specific, maybe we want to add the `darwin_` prefix, to avoid name clashes.

================
Comment at: test/asan/CMakeLists.txt:49
@@ +48,3 @@
+  else()
+    set(ASAN_TEST_TARGET_CFLAGS ${DARWIN_${os}_CFLAGS} -arch ${arch})
+    string(REPLACE ";" " " ASAN_TEST_TARGET_CFLAGS "${ASAN_TEST_TARGET_CFLAGS}")
----------------
Could this be done in `get_target_flags_for_arch`?

================
Comment at: test/sanitizer_common/CMakeLists.txt:38
@@ +37,3 @@
+    else()
+      set(SANITIZER_COMMON_TEST_TARGET_CFLAGS ${DARWIN_${os}_CFLAGS} -arch ${arch})
+      string(REPLACE ";" " " SANITIZER_COMMON_TEST_TARGET_CFLAGS "${SANITIZER_COMMON_TEST_TARGET_CFLAGS}")
----------------
Same as for `test/asan/CMakeLists.txt`.


http://reviews.llvm.org/D12174





More information about the llvm-commits mailing list