From 1426ed130471d2b84a03fc4c44235ef890bfdcdf Mon Sep 17 00:00:00 2001 From: mucor Date: Thu, 20 Jan 2022 19:48:26 +0800 Subject: [PATCH] fix: do not enbale hook in asan build re #I4PRNO Signed-off-by: mucor --- musl_template.gni | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/musl_template.gni b/musl_template.gni index 0fdd8db6..f032724f 100755 --- a/musl_template.gni +++ b/musl_template.gni @@ -157,9 +157,12 @@ template("musl_libs") { "-Werror=pointer-sign", "-Werror=pointer-arith", "-Qunused-arguments", - "-DHOOK_ENABLE", ] + if (!is_asan) { + cflags_auto += [ "-DHOOK_ENABLE" ] + } + cflags_c99fse = [ "-std=c99", "-nostdinc", @@ -213,8 +216,11 @@ template("musl_libs") { "__MUSL__", "_LIBCPP_HAS_MUSL_LIBC", "__BUILD_LINUX_WITH_CLANG", - "HOOK_ENABLE", ] + + if (!is_asan) { + defines += [ "HOOK_ENABLE" ] + } ldflags = [ "-nostdlib" ] libs = [] -- GitLab