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

Evgeniy Stepanov eugeni.stepanov at gmail.com
Tue Sep 11 04:57:39 PDT 2012


Thanks, r163612 and r163613.

On Mon, Sep 10, 2012 at 3:12 PM, Alexey Samsonov <samsonov at google.com> wrote:
> 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
>



More information about the llvm-commits mailing list