From 5e676fe9f02c51bca974bfa200bab4378f27020e Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Wed, 17 Apr 2019 13:12:10 +0900 Subject: [PATCH] Fix: HideFromMake is not registered to llndk_* module types llndk_* module types are not initialized via cc.Module.Init(). As a consequence, mutated properties like HideFromMake, etc. were not registered and this caused problem when the mutated properties are set by one of the mutators like the sanitizerMutator. Specifically, both asan and non-asan variant of an llndk_header were both exported to Make although HideFromMake was set to true for the non-asan variant. Fixing this bug by explicitly registering BaseProperties struct which contains the mutated properties. Bug: 130652996 Test: Following works: $ lunch aosp_cf_x86_pasan-userdebug $ mkdir frameworks/native/test && mkdir frameworks/native/test/include $ cat > frameworks/native/test/Android.bp llndk_headers { name: "test_headers", export_include_dirs: ["include"], } ^D $ SANITIZE_TARGET='address' make Change-Id: I44e3668460448d79382617df61171b0ab5b4d98d --- cc/llndk_library.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cc/llndk_library.go b/cc/llndk_library.go index 3e25481ac..6cdf5c700 100644 --- a/cc/llndk_library.go +++ b/cc/llndk_library.go @@ -182,6 +182,7 @@ func NewLLndkStubLibrary() *Module { module.installer = nil module.AddProperties( + &module.Properties, &stub.Properties, &library.MutatedProperties, &library.flagExporter.Properties) @@ -225,7 +226,10 @@ func llndkHeadersFactory() android.Module { module.linker = decorator module.installer = nil - module.AddProperties(&library.MutatedProperties, &library.flagExporter.Properties) + module.AddProperties( + &module.Properties, + &library.MutatedProperties, + &library.flagExporter.Properties) android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibBoth)