Fix path to flex and bison with SANITIZE_HOST
We don't have sanitized versions of flex and bison currently.
Test: forrest on aosp_x86_64-eng
Change-Id: I536885a715c162e36b69282099784abd16a5300c
diff --git a/core/config.mk b/core/config.mk
index b230d0d..04dca0f 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -552,8 +552,9 @@
prebuilt_build_tools := prebuilts/build-tools
prebuilt_build_tools_wrappers := prebuilts/build-tools/common/bin
prebuilt_build_tools_jars := prebuilts/build-tools/common/framework
+prebuilt_build_tools_bin_noasan := $(prebuilt_build_tools)/$(HOST_PREBUILT_TAG)/bin
ifeq ($(filter address,$(SANITIZE_HOST)),)
-prebuilt_build_tools_bin := $(prebuilt_build_tools)/$(HOST_PREBUILT_TAG)/bin
+prebuilt_build_tools_bin := $(prebuilt_build_tools_bin_noasan)
else
prebuilt_build_tools_bin := $(prebuilt_build_tools)/$(HOST_PREBUILT_TAG)/asan/bin
endif
@@ -623,13 +624,13 @@
# ---------------------------------------------------------------
# Generic tools.
-LEX := $(prebuilt_build_tools_bin)/flex
+LEX := $(prebuilt_build_tools_bin_noasan)/flex
# The default PKGDATADIR built in the prebuilt bison is a relative path
# prebuilts/build-tools/common/bison.
# To run bison from elsewhere you need to set up enviromental variable
# BISON_PKGDATADIR.
BISON_PKGDATADIR := $(PWD)/prebuilts/build-tools/common/bison
-BISON := $(prebuilt_build_tools_bin)/bison
+BISON := $(prebuilt_build_tools_bin_noasan)/bison
YACC := $(BISON) -d
BISON_DATA := $(wildcard $(BISON_PKGDATADIR)/* $(BISON_PKGDATADIR)/*/*)