Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef566ac4 authored by Inseob Kim's avatar Inseob Kim
Browse files

Reland "Add variables for init.environ.rc"

Relanding with a fix for hwasan build.
HWADDRESS_SANITIZER_GLOBAL_OPTIONS is set by Soong's MakeVars, so we
can't refer the variable on soong config modules. Instead, as the
variable is hard-coded, this change hard-codes options in Android.bp.

Bug: 353429422
Test: boot shiba with SANITIZE_TARGET=hwaddress
Change-Id: Idaf4417e3f51c1933264866799c211de7bd0821d
parent 0c791555
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -39,8 +39,14 @@ $(call add_soong_config_var,ANDROID,TARGET_DYNAMIC_64_32_MEDIASERVER)

# For Sanitizers
$(call soong_config_set_bool,ANDROID,ASAN_ENABLED,$(if $(filter address,$(SANITIZE_TARGET)),true,false))
$(call soong_config_set_bool,ANDROID,HWASAN_ENABLED,$(if $(filter hwaddress,$(SANITIZE_TARGET)),true,false))
$(call soong_config_set_bool,ANDROID,SANITIZE_TARGET_SYSTEM_ENABLED,$(if $(filter true,$(SANITIZE_TARGET_SYSTEM)),true,false))

# For init.environ.rc
$(call soong_config_set_bool,ANDROID,GCOV_COVERAGE,$(NATIVE_COVERAGE))
$(call soong_config_set_bool,ANDROID,CLANG_COVERAGE,$(CLANG_COVERAGE))
$(call soong_config_set,ANDROID,SCUDO_ALLOCATION_RING_BUFFER_SIZE,$(PRODUCT_SCUDO_ALLOCATION_RING_BUFFER_SIZE))

# PRODUCT_PRECOMPILED_SEPOLICY defaults to true. Explicitly check if it's "false" or not.
$(call soong_config_set_bool,ANDROID,PRODUCT_PRECOMPILED_SEPOLICY,$(if $(filter false,$(PRODUCT_PRECOMPILED_SEPOLICY)),false,true))