Merge "cc: Make generated_headers configurable" into main

This commit is contained in:
Aleks Todorov
2024-06-14 17:25:07 +00:00
committed by Gerrit Code Review

View File

@@ -98,7 +98,7 @@ type BaseCompilerProperties struct {
// list of generated headers to add to the include path. These are the names // list of generated headers to add to the include path. These are the names
// of genrule modules. // of genrule modules.
Generated_headers []string `android:"arch_variant,variant_prepend"` Generated_headers proptools.Configurable[[]string] `android:"arch_variant,variant_prepend"`
// pass -frtti instead of -fno-rtti // pass -frtti instead of -fno-rtti
Rtti *bool `android:"arch_variant"` Rtti *bool `android:"arch_variant"`
@@ -302,7 +302,7 @@ func (compiler *baseCompiler) compilerInit(ctx BaseModuleContext) {}
func (compiler *baseCompiler) compilerDeps(ctx DepsContext, deps Deps) Deps { func (compiler *baseCompiler) compilerDeps(ctx DepsContext, deps Deps) Deps {
deps.GeneratedSources = append(deps.GeneratedSources, compiler.Properties.Generated_sources...) deps.GeneratedSources = append(deps.GeneratedSources, compiler.Properties.Generated_sources...)
deps.GeneratedSources = removeListFromList(deps.GeneratedSources, compiler.Properties.Exclude_generated_sources) deps.GeneratedSources = removeListFromList(deps.GeneratedSources, compiler.Properties.Exclude_generated_sources)
deps.GeneratedHeaders = append(deps.GeneratedHeaders, compiler.Properties.Generated_headers...) deps.GeneratedHeaders = append(deps.GeneratedHeaders, compiler.Properties.Generated_headers.GetOrDefault(ctx, nil)...)
deps.AidlLibs = append(deps.AidlLibs, compiler.Properties.Aidl.Libs...) deps.AidlLibs = append(deps.AidlLibs, compiler.Properties.Aidl.Libs...)
android.ProtoDeps(ctx, &compiler.Proto) android.ProtoDeps(ctx, &compiler.Proto)