Skip to content
Snippets Groups Projects
Commit 19baf068 authored by Evgeniy Stepanov's avatar Evgeniy Stepanov
Browse files

Pass LLVM_ANDROID_TOOLCHAIN_DIR if set.

This lets one build ASan runtime for ARM/Android by running
make -C tools/clang/runtime/ \
  LLVM_ANDROID_TOOLCHAIN_DIR=/path/to/ndk/toolchain
in an existing build tree.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166560 91177308-0d34-0410-b5e6-96231b3b80d8
parent 5c51fc4a
No related branches found
No related tags found
No related merge requests found
......@@ -112,6 +112,9 @@ test_source = $(LLVM_SRC_ROOT)/tools/clang/runtime/compiler-rt/clang_linux_test_
ifeq ($(call TryCompile,$(ToolDir)/clang,$(test_source),-m32),0)
RuntimeLibrary.linux.Configs += asan-i386.a
endif
ifneq ($(LLVM_ANDROID_TOOLCHAIN_DIR),)
RuntimeLibrary.linux.Configs += asan-arm-android.so
endif
endif
endif
......@@ -130,6 +133,7 @@ BuildRuntimeLibraries:
ProjSrcRoot=$(COMPILERRT_SRC_ROOT) \
ProjObjRoot=$(PROJ_OBJ_DIR) \
CC="$(ToolDir)/clang" \
LLVM_ANDROID_TOOLCHAIN_DIR="$(LLVM_ANDROID_TOOLCHAIN_DIR)" \
$(RuntimeDirs:%=clang_%)
.PHONY: BuildRuntimeLibraries
CleanRuntimeLibraries:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment