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

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 17:08:43 PDT 2015


beanz added a comment.

I'll send updated patches shortly. I'm testing them now.


================
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})
----------------
filcab wrote:
> Since this function is Darwin-specific, maybe we want to add the `darwin_` prefix, to avoid name clashes.
Sure.

================
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}")
----------------
filcab wrote:
> Could this be done in `get_target_flags_for_arch`?
Looking at this it does seem like `get_target_flags_for_arch` is only used when building tests, so yes. I originally didn't want to do that because I was populating Darwin OS-specific flags, not arch-specific flags.


http://reviews.llvm.org/D12174





More information about the llvm-commits mailing list