From c6d2cf86d1fb79aa545b764818a0bfe217280dec Mon Sep 17 00:00:00 2001 From: Logan Chien Date: Thu, 31 Jan 2019 17:07:50 +0800 Subject: [PATCH] Fix linker_asan[64] apex bootstrap build error This commit fixes `linker_asan[64]` apex bootstrap build errors. Without this change, `make -j SANITIZE_TARGET=address` results in: FAILED: ninja: 'out/target/product/walleye/system/bin/linker_asan64', needed by 'out/target/product/walleye/system/bin/app_process64', missing and no known rule to make it Test: lunch aosp_walleye-userdebug && make SANITIZE_TARGET=address Change-Id: I980a36499cd327db307321fc8e4548925e7d56bf --- core/clang/TARGET_arm.mk | 1 + core/clang/TARGET_arm64.mk | 1 + core/clang/TARGET_mips.mk | 1 + core/clang/TARGET_mips64.mk | 1 + core/clang/TARGET_x86.mk | 1 + core/clang/TARGET_x86_64.mk | 1 + core/config_sanitizers.mk | 2 +- 7 files changed, 7 insertions(+), 1 deletion(-) diff --git a/core/clang/TARGET_arm.mk b/core/clang/TARGET_arm.mk index 6140d7cd2..f18747a44 100644 --- a/core/clang/TARGET_arm.mk +++ b/core/clang/TARGET_arm.mk @@ -7,3 +7,4 @@ $(clang_2nd_arch_prefix)TARGET_LIBCRT_BUILTINS := $(LLVM_RTLIB_PATH)/libclang_rt # Address sanitizer clang config $(clang_2nd_arch_prefix)ADDRESS_SANITIZER_LINKER := /system/bin/linker_asan +$(clang_2nd_arch_prefix)ADDRESS_SANITIZER_LINKER_FILE := /system/bin/bootstrap/linker_asan diff --git a/core/clang/TARGET_arm64.mk b/core/clang/TARGET_arm64.mk index 9fe55304b..42bed0aae 100644 --- a/core/clang/TARGET_arm64.mk +++ b/core/clang/TARGET_arm64.mk @@ -7,3 +7,4 @@ TARGET_LIBCRT_BUILTINS := $(LLVM_RTLIB_PATH)/libclang_rt.builtins-aarch64-androi # Address sanitizer clang config ADDRESS_SANITIZER_LINKER := /system/bin/linker_asan64 +ADDRESS_SANITIZER_LINKER_FILE := /system/bin/bootstrap/linker_asan64 diff --git a/core/clang/TARGET_mips.mk b/core/clang/TARGET_mips.mk index dfd99b281..3e54a6626 100644 --- a/core/clang/TARGET_mips.mk +++ b/core/clang/TARGET_mips.mk @@ -6,3 +6,4 @@ $(clang_2nd_arch_prefix)TARGET_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.p # Address sanitizer clang config $(clang_2nd_arch_prefix)ADDRESS_SANITIZER_LINKER := /system/bin/linker_asan +$(clang_2nd_arch_prefix)ADDRESS_SANITIZER_LINKER_FILE := /system/bin/bootstrap/linker_asan diff --git a/core/clang/TARGET_mips64.mk b/core/clang/TARGET_mips64.mk index a3684cc3d..cb6a3cde2 100644 --- a/core/clang/TARGET_mips64.mk +++ b/core/clang/TARGET_mips64.mk @@ -6,3 +6,4 @@ TARGET_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-mips64el-android. # Address sanitizer clang config $(clang_2nd_arch_prefix)ADDRESS_SANITIZER_LINKER := /system/bin/linker_asan64 +$(clang_2nd_arch_prefix)ADDRESS_SANITIZER_LINKER_FILE := /system/bin/bootstrap/linker_asan64 diff --git a/core/clang/TARGET_x86.mk b/core/clang/TARGET_x86.mk index 5e2d57ed7..5491a0597 100644 --- a/core/clang/TARGET_x86.mk +++ b/core/clang/TARGET_x86.mk @@ -7,3 +7,4 @@ $(clang_2nd_arch_prefix)TARGET_LIBCRT_BUILTINS := $(LLVM_RTLIB_PATH)/libclang_rt # Address sanitizer clang config $(clang_2nd_arch_prefix)ADDRESS_SANITIZER_LINKER := /system/bin/linker_asan +$(clang_2nd_arch_prefix)ADDRESS_SANITIZER_LINKER_FILE := /system/bin/bootstrap/linker_asan diff --git a/core/clang/TARGET_x86_64.mk b/core/clang/TARGET_x86_64.mk index 86b3798a9..167db72e7 100644 --- a/core/clang/TARGET_x86_64.mk +++ b/core/clang/TARGET_x86_64.mk @@ -7,3 +7,4 @@ TARGET_LIBCRT_BUILTINS := $(LLVM_RTLIB_PATH)/libclang_rt.builtins-x86_64-android # Address sanitizer clang config ADDRESS_SANITIZER_LINKER := /system/bin/linker_asan64 +ADDRESS_SANITIZER_LINKER_FILE := /system/bin/bootstrap/linker_asan64 diff --git a/core/config_sanitizers.mk b/core/config_sanitizers.mk index 6c9caa86c..bbf3b7dff 100644 --- a/core/config_sanitizers.mk +++ b/core/config_sanitizers.mk @@ -341,7 +341,7 @@ ifneq ($(filter address,$(my_global_sanitize) $(my_sanitize)),) ifneq ($(LOCAL_FORCE_STATIC_EXECUTABLE),true) my_linker := $($(LOCAL_2ND_ARCH_VAR_PREFIX)ADDRESS_SANITIZER_LINKER) # Make sure linker_asan get installed. - $(LOCAL_INSTALLED_MODULE) : | $(PRODUCT_OUT)$($(LOCAL_2ND_ARCH_VAR_PREFIX)ADDRESS_SANITIZER_LINKER) + $(LOCAL_INSTALLED_MODULE) : | $(PRODUCT_OUT)$($(LOCAL_2ND_ARCH_VAR_PREFIX)ADDRESS_SANITIZER_LINKER_FILE) endif endif endif