[llvm-commits] [PATCH] CMake build rules from asan android runtime and tests

Alexey Samsonov samsonov at google.com
Mon Sep 10 04:12:54 PDT 2012


ASan part looks good to me (added some minor comments in the codereview
tool).
Android toolchain-related stuff also _looks_ fine, but I think that CMake
build system
authors should comment on this (at least during the post-commit review,
since your
commit would hardly affect anyone).

On Thu, Sep 6, 2012 at 5:54 PM, Evgeniy Stepanov
<eugeni.stepanov at gmail.com>wrote:

> Hi,
>
> these patches simplify building asan runtime and tests for android. We
> remove all custom cflags and custom_command(s) out of individual
> CMakeLists (for now, this is done under if(ANDROID), but we'd like to
> do the same for x86 and x86_64 and the rest in the future). Instead,
> we add a CMake toolchain file in cmake/platforms that describes how to
> invoke a particular compiler.
>
> With this, asan tests can be compiled in a second build tree like this:
> mkdir build; cd build; cmake ..; make
> mkdir android; cd android
> cmake -DLLVM_ANDROID_TOOLCHAIN_DIR=/path/to/android/ndk
> -DCMAKE_TOOLCHAIN_FILE=../../cmake/platforms/Android.cmake ../..
> make AsanUnitTests
>
> Does this look like the right direction? Two build trees definitely
> add some complexity to the build process (which can be reduced
> eventually by auto-generating the second build tree depending on
> available toolchains/configurations). The alternative is forcing a
> custom compiler as we do in
> projects/compiler-rt/lib/asan/tests/CMakeLists.txt, but that's clearly
> an abuse of the build system.
>
> https://codereview.appspot.com/6506080
> https://codereview.appspot.com/6499083
>



-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120910/ce9ad3c7/attachment.html>


More information about the llvm-commits mailing list