[PATCH] Adding experimental build support for building compiler-rt for iOS.

Filipe Cabecinhas filcab+llvm.phabricator at gmail.com
Wed Jun 24 14:50:43 PDT 2015

Thanks for adding this!

Comment at: CMakeLists.txt:349
@@ +348,3 @@
+        ${toolchain_arches})
+      message(STATUS "iOS Sim supported arches: ${SANITIZER_COMMON_DARWIN_iossim_ARCHES}")
+    endif()
Nit: If we're printing a status message, I think we could spare the bytes to print "Simulator" :-)

Comment at: cmake/Modules/CompilerRTDarwinUtils.cmake:2
@@ +1,3 @@
+# On OS X SDKs can be installed anywhere on the base system and xcode-select
+# or SDKROOT can be used to set the default one to use. We want to find the SDKs
+# that are present in the current Xcode
This seems misleading. xcodebuild doesn't seem to honour SDKROOT.

If I have 10.10 and 10.9 installed, and set SDKROOT=/.../Xcode.app/.../MacOSX10.9.sdk, I get:
  [~]% xcodebuild -version -sdk macosx Path

(This is really handy when you have an SDK available for 10.(X+1), but are running on 10.X.

Comment at: lib/asan/CMakeLists.txt:116
@@ -115,3 +115,3 @@
     add_compiler_rt_darwin_dynamic_runtime(clang_rt.asan_${os}_dynamic ${os}
Just to be sure, ASan will be supported on all of the arch + OS that sanitizer_common will run on? (at first sight, it almost looks like a copy-paste bug)

You're adding object_libraries (line 80) for ASAN_SUPPORTED_ARCH, but then generate dynamic_runtimes for SANITIZER_COMMON_..._ARCHES. Shouldn't these be the same, at least?

Comment at: lib/ubsan/CMakeLists.txt:47
@@ -46,3 +46,3 @@
       add_compiler_rt_darwin_dynamic_runtime(clang_rt.ubsan_${os}_dynamic ${os}
         SOURCES $<TARGET_OBJECTS:RTUbsan.${os}>
Just to be sure, UBSan will be supported on all of the arch + OS that sanitizer_common will run on?

Same comment as ASan (check line 42 here).



More information about the llvm-commits mailing list