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
This commit is contained in:
Jiyong Park 2019-04-17 13:12:10 +09:00
parent 44d5d22db6
commit 5e676fe9f0
1 changed files with 5 additions and 1 deletions

View File

@ -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)