[PATCH] Make compiler-rt tests work with relocatable SDKs on OS X

Alexey Samsonov vonosmas at gmail.com
Sat Jun 7 23:57:27 PDT 2014


================
Comment at: compiler-rt/trunk/CMakeLists.txt:379
@@ +378,3 @@
+
+# We need c++ headers, on Darwin 10.9 there is no system-installed toolchain,
+# if we don't have libcxx, let's symlink to c++ directory provided with Xcode
----------------
I don't like the idea of adding a symlink - it seems too brittle and unexpected that compiler-rt build would for some reason create a symlink in the build tree that would point to c++ headers. If you can't provide path to c++ headers in CMAKE_CXX_FLAGS when you configure a build tree, consider just modifying the compile flags using the output of xcrun.

================
Comment at: compiler-rt/trunk/cmake/Modules/AddCompilerRT.cmake:151
@@ +150,3 @@
+  list(APPEND COMPILER_RT_GTEST_CFLAGS -isysroot ${OSX_SDK_DIR})
+  list(APPEND ASAN_UNITTEST_COMMON_LINKFLAGS -isysroot ${OSX_SDK_DIR})
+  list(APPEND ASAN_UNITTEST_COMMON_LINKFLAGS -framework Foundation)
----------------
Please don't use ASan-specific variables here.

================
Comment at: llvm/trunk/utils/lit/lit/util.py:171
@@ +170,3 @@
+
+def usePlatformSdkOnDarwin(config, lit_config):
+    # On Darwin, support relocatable SDKs by providing Clang with a
----------------
Please send this path to llvm-commits separately, and let lit maintainers decide if they want to add this functionality to lit.

http://reviews.llvm.org/D4047






More information about the llvm-commits mailing list