[PATCH] [sanitizer] Android build cleanup.

Alexey Samsonov vonosmas at gmail.com
Wed Sep 24 19:45:50 PDT 2014


LGTM. This is really nice.

================
Comment at: cmake/Modules/AddCompilerRT.cmake:46
@@ -45,3 +45,3 @@
 #                         CFLAGS <compile flags>
 #                         DEFS <compile definitions>)
 macro(add_compiler_rt_runtime name arch type)
----------------
While you're here, please mention OUTPUT_NAME in the comment.

================
Comment at: cmake/config-ix.cmake:95
@@ +94,3 @@
+
+macro(detect_target_arch)
+  check_symbol_exists(__arm__ "" __ARM)
----------------
Cool. We'd definitely need to do smth. similar for non-Andorid case.

================
Comment at: lib/asan/tests/CMakeLists.txt:83
@@ +82,3 @@
+set(ASAN_UNITTEST_INSTRUMENTED_LIBS)
+if(ANDROID)
+  # NDK r10 requires -latomic almost always.
----------------
Consider using append_if here as well.

================
Comment at: lib/asan/tests/CMakeLists.txt:99
@@ +98,3 @@
+# TODO(eugenis): move all -l flags above to _LIBS?
+set(ASAN_NOINST_INSTRUMENTED_LIBS)
+if(ANDROID)
----------------
incorrect variable name: should be ASAN_UNITTEST_NOINST_LIBS

================
Comment at: lib/asan/tests/CMakeLists.txt:100
@@ +99,3 @@
+set(ASAN_NOINST_INSTRUMENTED_LIBS)
+if(ANDROID)
+  # A bug in NDK r10 requires -latomic almost always.
----------------
and here

================
Comment at: lib/sanitizer_common/tests/CMakeLists.txt:63
@@ +62,3 @@
+  # NDK r10 requires -latomic almost always.
+  list(APPEND SANITIZER_TEST_LINK_LIBS log atomic)
+endif()
----------------
append_if

http://reviews.llvm.org/D5467






More information about the llvm-commits mailing list