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

Evgeniy Stepanov eugenis at google.com
Thu Feb 27 00:20:34 PST 2014



================
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})
----------------
Alexey Samsonov wrote:
> 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"?
done

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

================
Comment at: lib/asan/scripts/CMakeLists.txt:1
@@ +1,2 @@
+macro(add_script name)
+  set(dst ${COMPILER_RT_EXEC_OUTPUT_DIR}/${name})
----------------
Alexey Samsonov wrote:
> 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).
done

================
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)
----------------
Alexey Samsonov wrote:
> Why do you need ALL here?
removed

================
Comment at: lib/asan/scripts/CMakeLists.txt:13
@@ +12,3 @@
+  add_script(asan_device_setup)
+  add_dependencies(asan_device_setup asan)
+endif()
----------------
Alexey Samsonov wrote:
> 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.
ok, sure
I wanted make asan_device_setup to also build clang_rt library that the script installs.



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



More information about the llvm-commits mailing list