[PATCH] [asan] Install asan_device_setup to bin/ when targetting Android

Alexey Samsonov samsonov at google.com
Wed Feb 26 23:34:04 PST 2014



================
Comment at: lib/asan/scripts/CMakeLists.txt:8
@@ +7,3 @@
+    COMMENT "Copying ${name}...")
+  add_custom_target(${name} ALL DEPENDS ${dst})
+endmacro(add_script src name)
----------------
Why do you need ALL here?

================
Comment at: lib/asan/scripts/CMakeLists.txt:1
@@ +1,2 @@
+macro(add_script name)
+  set(dst ${COMPILER_RT_EXEC_OUTPUT_DIR}/${name})
----------------
Consider moving this to cmake/Modules/AddCompilerRT.cmake
There is a similar add_compiler_rt_resource_file there (though, it copies the file to another directory).

================
Comment at: lib/asan/scripts/CMakeLists.txt:13
@@ +12,3 @@
+  add_script(asan_device_setup)
+  add_dependencies(asan_device_setup asan)
+endif()
----------------
Weird, I think you need to make "asan" depend on "asan_device_setup", not vice versa. So, when the user runs "make asan", it also builds asan_device_setup.

================
Comment at: CMakeLists.txt:40
@@ -39,2 +39,3 @@
   set(COMPILER_RT_OUTPUT_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION})
+  set(COMPILER_RT_EXEC_OUTPUT_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
   set(COMPILER_RT_INSTALL_PATH lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION})
----------------
This is OK to adding asan_device_setup in a build tree, but do you need to install it somewhere, when user calls "make install"?

================
Comment at: lib/asan/CMakeLists.txt:142
@@ +141,2 @@
+
+add_subdirectory(scripts)
----------------
Please put this call before we add tests (e.g. right after add_dependencies(asan asan_blacklist))


http://llvm-reviews.chandlerc.com/D2887



More information about the llvm-commits mailing list