Merge "Handle includes for generated headers" am: 6f32f95b25
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1918455 Change-Id: I2f5a84791ff7f396ae0b1cb571c46a8f9810f9f0
This commit is contained in:
committed by
Automerger Merge Worker
commit
d469eefcc3
@@ -422,17 +422,11 @@ var (
|
|||||||
// APEX support
|
// APEX support
|
||||||
"com.android.runtime", // http://b/194746715, apex, depends on 'libc_malloc_debug'
|
"com.android.runtime", // http://b/194746715, apex, depends on 'libc_malloc_debug'
|
||||||
|
|
||||||
"libadbd_core", // http://b/208481704: requijres use_version_lib
|
|
||||||
"libadbd_services", // http://b/208481704: requires use_version_lib
|
|
||||||
|
|
||||||
"libadbd", // depends on unconverted modules: libadbd_core, libadbd_services
|
|
||||||
|
|
||||||
"libgtest_ndk_c++", // b/201816222: Requires sdk_version support.
|
"libgtest_ndk_c++", // b/201816222: Requires sdk_version support.
|
||||||
"libgtest_main_ndk_c++", // b/201816222: Requires sdk_version support.
|
"libgtest_main_ndk_c++", // b/201816222: Requires sdk_version support.
|
||||||
|
|
||||||
"abb", // depends on unconverted modules: libadbd_core, libadbd_services,
|
"abb", // depends on unconverted modules: libcmd, libbinder
|
||||||
"adb", // depends on unconverted modules: bin2c_fastdeployagent, libadb_crypto, libadb_host, libadb_pairing_connection, libadb_protos, libandroidfw, libapp_processes_protos_full, libfastdeploy_host, libopenscreen-discovery, libopenscreen-platform-impl, libusb, libzstd, AdbWinApi
|
"adb", // depends on unconverted modules: AdbWinApi, libadb_host, libandroidfw, libapp_processes_protos_full, libfastdeploy_host, libopenscreen-discovery, libopenscreen-platform-impl, libusb, bin2c_fastdeployagent, AdbWinUsbApi
|
||||||
"adbd", // depends on unconverted modules: libadb_crypto, libadb_pairing_connection, libadb_protos, libadbd, libadbd_core, libapp_processes_protos_lite, libzstd, libadbd_services, libcap, libminijail
|
|
||||||
"linker", // depends on unconverted modules: libdebuggerd_handler_fallback
|
"linker", // depends on unconverted modules: libdebuggerd_handler_fallback
|
||||||
"linker_reloc_bench_main", // depends on unconverted modules: liblinker_reloc_bench_*
|
"linker_reloc_bench_main", // depends on unconverted modules: liblinker_reloc_bench_*
|
||||||
"versioner", // depends on unconverted modules: libclang_cxx_host, libLLVM_host, of unsupported type llvm_host_prebuilt_library_shared
|
"versioner", // depends on unconverted modules: libclang_cxx_host, libLLVM_host, of unsupported type llvm_host_prebuilt_library_shared
|
||||||
|
@@ -303,6 +303,7 @@ genrule {
|
|||||||
":not_explicitly_exported_whole_static_dep",
|
":not_explicitly_exported_whole_static_dep",
|
||||||
":whole_static_dep",
|
":whole_static_dep",
|
||||||
]`,
|
]`,
|
||||||
|
"local_includes": `["."]`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@@ -970,7 +970,9 @@ cc_library_static {
|
|||||||
}`,
|
}`,
|
||||||
expectedBazelTargets: []string{
|
expectedBazelTargets: []string{
|
||||||
makeBazelTarget("cc_library_static", "foo_static", attrNameToString{
|
makeBazelTarget("cc_library_static", "foo_static", attrNameToString{
|
||||||
"hdrs": `[":export_generated_hdr"]`,
|
"export_includes": `["."]`,
|
||||||
|
"local_includes": `["."]`,
|
||||||
|
"hdrs": `[":export_generated_hdr"]`,
|
||||||
"srcs": `[
|
"srcs": `[
|
||||||
"cpp_src.cpp",
|
"cpp_src.cpp",
|
||||||
":generated_hdr",
|
":generated_hdr",
|
||||||
@@ -1044,18 +1046,21 @@ cc_library_static {
|
|||||||
exclude_srcs: ["not-for-everything.cpp"],
|
exclude_srcs: ["not-for-everything.cpp"],
|
||||||
generated_sources: ["generated_src", "generated_src_other_pkg", "generated_src_not_x86"],
|
generated_sources: ["generated_src", "generated_src_other_pkg", "generated_src_not_x86"],
|
||||||
generated_headers: ["generated_hdr", "generated_hdr_other_pkg"],
|
generated_headers: ["generated_hdr", "generated_hdr_other_pkg"],
|
||||||
|
export_generated_headers: ["generated_hdr_other_pkg"],
|
||||||
arch: {
|
arch: {
|
||||||
x86: {
|
x86: {
|
||||||
srcs: ["for-x86.cpp"],
|
srcs: ["for-x86.cpp"],
|
||||||
exclude_srcs: ["not-for-x86.cpp"],
|
exclude_srcs: ["not-for-x86.cpp"],
|
||||||
generated_headers: ["generated_hdr_other_pkg_x86"],
|
generated_headers: ["generated_hdr_other_pkg_x86"],
|
||||||
exclude_generated_sources: ["generated_src_not_x86"],
|
exclude_generated_sources: ["generated_src_not_x86"],
|
||||||
|
export_generated_headers: ["generated_hdr_other_pkg_x86"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
target: {
|
target: {
|
||||||
android: {
|
android: {
|
||||||
generated_sources: ["generated_src_android"],
|
generated_sources: ["generated_src_android"],
|
||||||
generated_headers: ["generated_hdr_other_pkg_android"],
|
generated_headers: ["generated_hdr_other_pkg_android"],
|
||||||
|
export_generated_headers: ["generated_hdr_other_pkg_android"],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -1069,23 +1074,25 @@ cc_library_static {
|
|||||||
":generated_src",
|
":generated_src",
|
||||||
"//dep:generated_src_other_pkg",
|
"//dep:generated_src_other_pkg",
|
||||||
":generated_hdr",
|
":generated_hdr",
|
||||||
"//dep:generated_hdr_other_pkg",
|
|
||||||
] + select({
|
] + select({
|
||||||
"//build/bazel/platforms/arch:x86": [
|
"//build/bazel/platforms/arch:x86": ["for-x86.cpp"],
|
||||||
"for-x86.cpp",
|
|
||||||
"//dep:generated_hdr_other_pkg_x86",
|
|
||||||
],
|
|
||||||
"//conditions:default": [
|
"//conditions:default": [
|
||||||
"not-for-x86.cpp",
|
"not-for-x86.cpp",
|
||||||
":generated_src_not_x86",
|
":generated_src_not_x86",
|
||||||
],
|
],
|
||||||
}) + select({
|
}) + select({
|
||||||
"//build/bazel/platforms/os:android": [
|
"//build/bazel/platforms/os:android": [":generated_src_android"],
|
||||||
":generated_src_android",
|
|
||||||
"//dep:generated_hdr_other_pkg_android",
|
|
||||||
],
|
|
||||||
"//conditions:default": [],
|
"//conditions:default": [],
|
||||||
})`,
|
})`,
|
||||||
|
"hdrs": `["//dep:generated_hdr_other_pkg"] + select({
|
||||||
|
"//build/bazel/platforms/arch:x86": ["//dep:generated_hdr_other_pkg_x86"],
|
||||||
|
"//conditions:default": [],
|
||||||
|
}) + select({
|
||||||
|
"//build/bazel/platforms/os:android": ["//dep:generated_hdr_other_pkg_android"],
|
||||||
|
"//conditions:default": [],
|
||||||
|
})`,
|
||||||
|
"local_includes": `["."]`,
|
||||||
|
"export_absolute_includes": `["dep"]`,
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@@ -267,6 +267,8 @@ type compilerAttributes struct {
|
|||||||
localIncludes bazel.StringListAttribute
|
localIncludes bazel.StringListAttribute
|
||||||
absoluteIncludes bazel.StringListAttribute
|
absoluteIncludes bazel.StringListAttribute
|
||||||
|
|
||||||
|
includes BazelIncludes
|
||||||
|
|
||||||
protoSrcs bazel.LabelListAttribute
|
protoSrcs bazel.LabelListAttribute
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -412,6 +414,33 @@ func bp2buildResolveCppStdValue(c_std *string, cpp_std *string, gnu_extensions *
|
|||||||
return c_std_prop, cpp_std_prop
|
return c_std_prop, cpp_std_prop
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// packageFromLabel extracts package from a fully-qualified or relative Label and whether the label
|
||||||
|
// is fully-qualified.
|
||||||
|
// e.g. fully-qualified "//a/b:foo" -> "a/b", true, relative: ":bar" -> ".", false
|
||||||
|
func packageFromLabel(label string) (string, bool) {
|
||||||
|
split := strings.Split(label, ":")
|
||||||
|
if len(split) != 2 {
|
||||||
|
return "", false
|
||||||
|
}
|
||||||
|
if split[0] == "" {
|
||||||
|
return ".", false
|
||||||
|
}
|
||||||
|
// remove leading "//"
|
||||||
|
return split[0][2:], true
|
||||||
|
}
|
||||||
|
|
||||||
|
// includesFromLabelList extracts relative/absolute includes from a bazel.LabelList>
|
||||||
|
func includesFromLabelList(labelList bazel.LabelList) (relative, absolute []string) {
|
||||||
|
for _, hdr := range labelList.Includes {
|
||||||
|
if pkg, hasPkg := packageFromLabel(hdr.Label); hasPkg {
|
||||||
|
absolute = append(absolute, pkg)
|
||||||
|
} else if pkg != "" {
|
||||||
|
relative = append(relative, pkg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return relative, absolute
|
||||||
|
}
|
||||||
|
|
||||||
// bp2BuildParseCompilerProps returns copts, srcs and hdrs and other attributes.
|
// bp2BuildParseCompilerProps returns copts, srcs and hdrs and other attributes.
|
||||||
func bp2BuildParseBaseProps(ctx android.Bp2buildMutatorContext, module *Module) baseAttributes {
|
func bp2BuildParseBaseProps(ctx android.Bp2buildMutatorContext, module *Module) baseAttributes {
|
||||||
archVariantCompilerProps := module.GetArchVariantProperties(ctx, &BaseCompilerProperties{})
|
archVariantCompilerProps := module.GetArchVariantProperties(ctx, &BaseCompilerProperties{})
|
||||||
@@ -455,6 +484,18 @@ func bp2BuildParseBaseProps(ctx android.Bp2buildMutatorContext, module *Module)
|
|||||||
headers := maybePartitionExportedAndImplementationsDeps(ctx, !module.Binary(), allHdrs, exportHdrs, android.BazelLabelForModuleDeps)
|
headers := maybePartitionExportedAndImplementationsDeps(ctx, !module.Binary(), allHdrs, exportHdrs, android.BazelLabelForModuleDeps)
|
||||||
implementationHdrs.SetSelectValue(axis, config, headers.implementation)
|
implementationHdrs.SetSelectValue(axis, config, headers.implementation)
|
||||||
compilerAttrs.hdrs.SetSelectValue(axis, config, headers.export)
|
compilerAttrs.hdrs.SetSelectValue(axis, config, headers.export)
|
||||||
|
|
||||||
|
exportIncludes, exportAbsoluteIncludes := includesFromLabelList(headers.export)
|
||||||
|
compilerAttrs.includes.Includes.SetSelectValue(axis, config, exportIncludes)
|
||||||
|
compilerAttrs.includes.AbsoluteIncludes.SetSelectValue(axis, config, exportAbsoluteIncludes)
|
||||||
|
|
||||||
|
includes, absoluteIncludes := includesFromLabelList(headers.implementation)
|
||||||
|
currAbsoluteIncludes := compilerAttrs.absoluteIncludes.SelectValue(axis, config)
|
||||||
|
currAbsoluteIncludes = android.FirstUniqueStrings(append(currAbsoluteIncludes, absoluteIncludes...))
|
||||||
|
compilerAttrs.absoluteIncludes.SetSelectValue(axis, config, currAbsoluteIncludes)
|
||||||
|
currIncludes := compilerAttrs.localIncludes.SelectValue(axis, config)
|
||||||
|
currIncludes = android.FirstUniqueStrings(append(currIncludes, includes...))
|
||||||
|
compilerAttrs.localIncludes.SetSelectValue(axis, config, currIncludes)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -692,13 +733,14 @@ func bp2BuildMakePathsRelativeToModule(ctx android.BazelConversionPathContext, p
|
|||||||
// BazelIncludes contains information about -I and -isystem paths from a module converted to Bazel
|
// BazelIncludes contains information about -I and -isystem paths from a module converted to Bazel
|
||||||
// attributes.
|
// attributes.
|
||||||
type BazelIncludes struct {
|
type BazelIncludes struct {
|
||||||
Includes bazel.StringListAttribute
|
AbsoluteIncludes bazel.StringListAttribute
|
||||||
SystemIncludes bazel.StringListAttribute
|
Includes bazel.StringListAttribute
|
||||||
|
SystemIncludes bazel.StringListAttribute
|
||||||
}
|
}
|
||||||
|
|
||||||
func bp2BuildParseExportedIncludes(ctx android.BazelConversionPathContext, module *Module) BazelIncludes {
|
func bp2BuildParseExportedIncludes(ctx android.BazelConversionPathContext, module *Module, existingIncludes BazelIncludes) BazelIncludes {
|
||||||
libraryDecorator := module.linker.(*libraryDecorator)
|
libraryDecorator := module.linker.(*libraryDecorator)
|
||||||
return bp2BuildParseExportedIncludesHelper(ctx, module, libraryDecorator)
|
return bp2BuildParseExportedIncludesHelper(ctx, module, libraryDecorator, &existingIncludes)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bp2buildParseExportedIncludesForPrebuiltLibrary returns a BazelIncludes with Bazel-ified values
|
// Bp2buildParseExportedIncludesForPrebuiltLibrary returns a BazelIncludes with Bazel-ified values
|
||||||
@@ -706,25 +748,31 @@ func bp2BuildParseExportedIncludes(ctx android.BazelConversionPathContext, modul
|
|||||||
func Bp2BuildParseExportedIncludesForPrebuiltLibrary(ctx android.BazelConversionPathContext, module *Module) BazelIncludes {
|
func Bp2BuildParseExportedIncludesForPrebuiltLibrary(ctx android.BazelConversionPathContext, module *Module) BazelIncludes {
|
||||||
prebuiltLibraryLinker := module.linker.(*prebuiltLibraryLinker)
|
prebuiltLibraryLinker := module.linker.(*prebuiltLibraryLinker)
|
||||||
libraryDecorator := prebuiltLibraryLinker.libraryDecorator
|
libraryDecorator := prebuiltLibraryLinker.libraryDecorator
|
||||||
return bp2BuildParseExportedIncludesHelper(ctx, module, libraryDecorator)
|
return bp2BuildParseExportedIncludesHelper(ctx, module, libraryDecorator, nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
// bp2BuildParseExportedIncludes creates a string list attribute contains the
|
// bp2BuildParseExportedIncludes creates a string list attribute contains the
|
||||||
// exported included directories of a module.
|
// exported included directories of a module.
|
||||||
func bp2BuildParseExportedIncludesHelper(ctx android.BazelConversionPathContext, module *Module, libraryDecorator *libraryDecorator) BazelIncludes {
|
func bp2BuildParseExportedIncludesHelper(ctx android.BazelConversionPathContext, module *Module, libraryDecorator *libraryDecorator, includes *BazelIncludes) BazelIncludes {
|
||||||
exported := BazelIncludes{}
|
var exported BazelIncludes
|
||||||
|
if includes != nil {
|
||||||
|
exported = *includes
|
||||||
|
} else {
|
||||||
|
exported = BazelIncludes{}
|
||||||
|
}
|
||||||
for axis, configToProps := range module.GetArchVariantProperties(ctx, &FlagExporterProperties{}) {
|
for axis, configToProps := range module.GetArchVariantProperties(ctx, &FlagExporterProperties{}) {
|
||||||
for config, props := range configToProps {
|
for config, props := range configToProps {
|
||||||
if flagExporterProperties, ok := props.(*FlagExporterProperties); ok {
|
if flagExporterProperties, ok := props.(*FlagExporterProperties); ok {
|
||||||
if len(flagExporterProperties.Export_include_dirs) > 0 {
|
if len(flagExporterProperties.Export_include_dirs) > 0 {
|
||||||
exported.Includes.SetSelectValue(axis, config, flagExporterProperties.Export_include_dirs)
|
exported.Includes.SetSelectValue(axis, config, android.FirstUniqueStrings(append(exported.Includes.SelectValue(axis, config), flagExporterProperties.Export_include_dirs...)))
|
||||||
}
|
}
|
||||||
if len(flagExporterProperties.Export_system_include_dirs) > 0 {
|
if len(flagExporterProperties.Export_system_include_dirs) > 0 {
|
||||||
exported.SystemIncludes.SetSelectValue(axis, config, flagExporterProperties.Export_system_include_dirs)
|
exported.SystemIncludes.SetSelectValue(axis, config, android.FirstUniqueStrings(append(exported.SystemIncludes.SelectValue(axis, config), flagExporterProperties.Export_system_include_dirs...)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
exported.AbsoluteIncludes.DeduplicateAxesFromBase()
|
||||||
exported.Includes.DeduplicateAxesFromBase()
|
exported.Includes.DeduplicateAxesFromBase()
|
||||||
exported.SystemIncludes.DeduplicateAxesFromBase()
|
exported.SystemIncludes.DeduplicateAxesFromBase()
|
||||||
|
|
||||||
|
@@ -300,7 +300,7 @@ func CcLibraryBp2Build(ctx android.TopDownMutatorContext) {
|
|||||||
baseAttributes := bp2BuildParseBaseProps(ctx, m)
|
baseAttributes := bp2BuildParseBaseProps(ctx, m)
|
||||||
compilerAttrs := baseAttributes.compilerAttributes
|
compilerAttrs := baseAttributes.compilerAttributes
|
||||||
linkerAttrs := baseAttributes.linkerAttributes
|
linkerAttrs := baseAttributes.linkerAttributes
|
||||||
exportedIncludes := bp2BuildParseExportedIncludes(ctx, m)
|
exportedIncludes := bp2BuildParseExportedIncludes(ctx, m, compilerAttrs.includes)
|
||||||
|
|
||||||
srcs := compilerAttrs.srcs
|
srcs := compilerAttrs.srcs
|
||||||
|
|
||||||
@@ -351,15 +351,16 @@ func CcLibraryBp2Build(ctx android.TopDownMutatorContext) {
|
|||||||
Conlyflags: compilerAttrs.conlyFlags,
|
Conlyflags: compilerAttrs.conlyFlags,
|
||||||
Asflags: asFlags,
|
Asflags: asFlags,
|
||||||
|
|
||||||
Export_includes: exportedIncludes.Includes,
|
Export_includes: exportedIncludes.Includes,
|
||||||
Export_system_includes: exportedIncludes.SystemIncludes,
|
Export_absolute_includes: exportedIncludes.AbsoluteIncludes,
|
||||||
Local_includes: compilerAttrs.localIncludes,
|
Export_system_includes: exportedIncludes.SystemIncludes,
|
||||||
Absolute_includes: compilerAttrs.absoluteIncludes,
|
Local_includes: compilerAttrs.localIncludes,
|
||||||
Use_libcrt: linkerAttrs.useLibcrt,
|
Absolute_includes: compilerAttrs.absoluteIncludes,
|
||||||
Rtti: compilerAttrs.rtti,
|
Use_libcrt: linkerAttrs.useLibcrt,
|
||||||
Stl: compilerAttrs.stl,
|
Rtti: compilerAttrs.rtti,
|
||||||
Cpp_std: compilerAttrs.cppStd,
|
Stl: compilerAttrs.stl,
|
||||||
C_std: compilerAttrs.cStd,
|
Cpp_std: compilerAttrs.cppStd,
|
||||||
|
C_std: compilerAttrs.cStd,
|
||||||
|
|
||||||
Features: linkerAttrs.features,
|
Features: linkerAttrs.features,
|
||||||
}
|
}
|
||||||
@@ -370,17 +371,18 @@ func CcLibraryBp2Build(ctx android.TopDownMutatorContext) {
|
|||||||
Conlyflags: compilerAttrs.conlyFlags,
|
Conlyflags: compilerAttrs.conlyFlags,
|
||||||
Asflags: asFlags,
|
Asflags: asFlags,
|
||||||
|
|
||||||
Export_includes: exportedIncludes.Includes,
|
Export_includes: exportedIncludes.Includes,
|
||||||
Export_system_includes: exportedIncludes.SystemIncludes,
|
Export_absolute_includes: exportedIncludes.AbsoluteIncludes,
|
||||||
Local_includes: compilerAttrs.localIncludes,
|
Export_system_includes: exportedIncludes.SystemIncludes,
|
||||||
Absolute_includes: compilerAttrs.absoluteIncludes,
|
Local_includes: compilerAttrs.localIncludes,
|
||||||
Linkopts: linkerAttrs.linkopts,
|
Absolute_includes: compilerAttrs.absoluteIncludes,
|
||||||
Link_crt: linkerAttrs.linkCrt,
|
Linkopts: linkerAttrs.linkopts,
|
||||||
Use_libcrt: linkerAttrs.useLibcrt,
|
Link_crt: linkerAttrs.linkCrt,
|
||||||
Rtti: compilerAttrs.rtti,
|
Use_libcrt: linkerAttrs.useLibcrt,
|
||||||
Stl: compilerAttrs.stl,
|
Rtti: compilerAttrs.rtti,
|
||||||
Cpp_std: compilerAttrs.cppStd,
|
Stl: compilerAttrs.stl,
|
||||||
C_std: compilerAttrs.cStd,
|
Cpp_std: compilerAttrs.cppStd,
|
||||||
|
C_std: compilerAttrs.cStd,
|
||||||
|
|
||||||
Additional_linker_inputs: linkerAttrs.additionalLinkerInputs,
|
Additional_linker_inputs: linkerAttrs.additionalLinkerInputs,
|
||||||
|
|
||||||
@@ -2434,7 +2436,7 @@ func ccSharedOrStaticBp2BuildMutatorInternal(ctx android.TopDownMutatorContext,
|
|||||||
compilerAttrs := baseAttributes.compilerAttributes
|
compilerAttrs := baseAttributes.compilerAttributes
|
||||||
linkerAttrs := baseAttributes.linkerAttributes
|
linkerAttrs := baseAttributes.linkerAttributes
|
||||||
|
|
||||||
exportedIncludes := bp2BuildParseExportedIncludes(ctx, module)
|
exportedIncludes := bp2BuildParseExportedIncludes(ctx, module, compilerAttrs.includes)
|
||||||
|
|
||||||
// Append shared/static{} stanza properties. These won't be specified on
|
// Append shared/static{} stanza properties. These won't be specified on
|
||||||
// cc_library_* itself, but may be specified in cc_defaults that this module
|
// cc_library_* itself, but may be specified in cc_defaults that this module
|
||||||
@@ -2483,14 +2485,16 @@ func ccSharedOrStaticBp2BuildMutatorInternal(ctx android.TopDownMutatorContext,
|
|||||||
Use_libcrt: linkerAttrs.useLibcrt,
|
Use_libcrt: linkerAttrs.useLibcrt,
|
||||||
Use_version_lib: linkerAttrs.useVersionLib,
|
Use_version_lib: linkerAttrs.useVersionLib,
|
||||||
|
|
||||||
Rtti: compilerAttrs.rtti,
|
Rtti: compilerAttrs.rtti,
|
||||||
Stl: compilerAttrs.stl,
|
Stl: compilerAttrs.stl,
|
||||||
Cpp_std: compilerAttrs.cppStd,
|
Cpp_std: compilerAttrs.cppStd,
|
||||||
C_std: compilerAttrs.cStd,
|
C_std: compilerAttrs.cStd,
|
||||||
Export_includes: exportedIncludes.Includes,
|
|
||||||
Export_system_includes: exportedIncludes.SystemIncludes,
|
Export_includes: exportedIncludes.Includes,
|
||||||
Local_includes: compilerAttrs.localIncludes,
|
Export_absolute_includes: exportedIncludes.AbsoluteIncludes,
|
||||||
Absolute_includes: compilerAttrs.absoluteIncludes,
|
Export_system_includes: exportedIncludes.SystemIncludes,
|
||||||
|
Local_includes: compilerAttrs.localIncludes,
|
||||||
|
Absolute_includes: compilerAttrs.absoluteIncludes,
|
||||||
|
|
||||||
Cppflags: compilerAttrs.cppFlags,
|
Cppflags: compilerAttrs.cppFlags,
|
||||||
Conlyflags: compilerAttrs.conlyFlags,
|
Conlyflags: compilerAttrs.conlyFlags,
|
||||||
@@ -2519,6 +2523,7 @@ func ccSharedOrStaticBp2BuildMutatorInternal(ctx android.TopDownMutatorContext,
|
|||||||
C_std: compilerAttrs.cStd,
|
C_std: compilerAttrs.cStd,
|
||||||
|
|
||||||
Export_includes: exportedIncludes.Includes,
|
Export_includes: exportedIncludes.Includes,
|
||||||
|
Export_absolute_includes: exportedIncludes.AbsoluteIncludes,
|
||||||
Export_system_includes: exportedIncludes.SystemIncludes,
|
Export_system_includes: exportedIncludes.SystemIncludes,
|
||||||
Local_includes: compilerAttrs.localIncludes,
|
Local_includes: compilerAttrs.localIncludes,
|
||||||
Absolute_includes: compilerAttrs.absoluteIncludes,
|
Absolute_includes: compilerAttrs.absoluteIncludes,
|
||||||
@@ -2556,11 +2561,12 @@ type bazelCcLibraryStaticAttributes struct {
|
|||||||
Cpp_std *string
|
Cpp_std *string
|
||||||
C_std *string
|
C_std *string
|
||||||
|
|
||||||
Export_includes bazel.StringListAttribute
|
Export_includes bazel.StringListAttribute
|
||||||
Export_system_includes bazel.StringListAttribute
|
Export_absolute_includes bazel.StringListAttribute
|
||||||
Local_includes bazel.StringListAttribute
|
Export_system_includes bazel.StringListAttribute
|
||||||
Absolute_includes bazel.StringListAttribute
|
Local_includes bazel.StringListAttribute
|
||||||
Hdrs bazel.LabelListAttribute
|
Absolute_includes bazel.StringListAttribute
|
||||||
|
Hdrs bazel.LabelListAttribute
|
||||||
|
|
||||||
Cppflags bazel.StringListAttribute
|
Cppflags bazel.StringListAttribute
|
||||||
Conlyflags bazel.StringListAttribute
|
Conlyflags bazel.StringListAttribute
|
||||||
@@ -2596,11 +2602,12 @@ type bazelCcLibrarySharedAttributes struct {
|
|||||||
Cpp_std *string
|
Cpp_std *string
|
||||||
C_std *string
|
C_std *string
|
||||||
|
|
||||||
Export_includes bazel.StringListAttribute
|
Export_includes bazel.StringListAttribute
|
||||||
Export_system_includes bazel.StringListAttribute
|
Export_absolute_includes bazel.StringListAttribute
|
||||||
Local_includes bazel.StringListAttribute
|
Export_system_includes bazel.StringListAttribute
|
||||||
Absolute_includes bazel.StringListAttribute
|
Local_includes bazel.StringListAttribute
|
||||||
Hdrs bazel.LabelListAttribute
|
Absolute_includes bazel.StringListAttribute
|
||||||
|
Hdrs bazel.LabelListAttribute
|
||||||
|
|
||||||
Strip stripAttributes
|
Strip stripAttributes
|
||||||
Additional_linker_inputs bazel.LabelListAttribute
|
Additional_linker_inputs bazel.LabelListAttribute
|
||||||
|
@@ -108,12 +108,13 @@ func prebuiltLibraryHeaderFactory() android.Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type bazelCcLibraryHeadersAttributes struct {
|
type bazelCcLibraryHeadersAttributes struct {
|
||||||
Hdrs bazel.LabelListAttribute
|
Hdrs bazel.LabelListAttribute
|
||||||
Export_includes bazel.StringListAttribute
|
Export_includes bazel.StringListAttribute
|
||||||
Export_system_includes bazel.StringListAttribute
|
Export_absolute_includes bazel.StringListAttribute
|
||||||
Deps bazel.LabelListAttribute
|
Export_system_includes bazel.StringListAttribute
|
||||||
Implementation_deps bazel.LabelListAttribute
|
Deps bazel.LabelListAttribute
|
||||||
System_dynamic_deps bazel.LabelListAttribute
|
Implementation_deps bazel.LabelListAttribute
|
||||||
|
System_dynamic_deps bazel.LabelListAttribute
|
||||||
}
|
}
|
||||||
|
|
||||||
func CcLibraryHeadersBp2Build(ctx android.TopDownMutatorContext) {
|
func CcLibraryHeadersBp2Build(ctx android.TopDownMutatorContext) {
|
||||||
@@ -131,17 +132,18 @@ func CcLibraryHeadersBp2Build(ctx android.TopDownMutatorContext) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
exportedIncludes := bp2BuildParseExportedIncludes(ctx, module)
|
|
||||||
baseAttributes := bp2BuildParseBaseProps(ctx, module)
|
baseAttributes := bp2BuildParseBaseProps(ctx, module)
|
||||||
|
exportedIncludes := bp2BuildParseExportedIncludes(ctx, module, baseAttributes.includes)
|
||||||
linkerAttrs := baseAttributes.linkerAttributes
|
linkerAttrs := baseAttributes.linkerAttributes
|
||||||
|
|
||||||
attrs := &bazelCcLibraryHeadersAttributes{
|
attrs := &bazelCcLibraryHeadersAttributes{
|
||||||
Export_includes: exportedIncludes.Includes,
|
Export_includes: exportedIncludes.Includes,
|
||||||
Export_system_includes: exportedIncludes.SystemIncludes,
|
Export_absolute_includes: exportedIncludes.AbsoluteIncludes,
|
||||||
Implementation_deps: linkerAttrs.implementationDeps,
|
Export_system_includes: exportedIncludes.SystemIncludes,
|
||||||
Deps: linkerAttrs.deps,
|
Implementation_deps: linkerAttrs.implementationDeps,
|
||||||
System_dynamic_deps: linkerAttrs.systemDynamicDeps,
|
Deps: linkerAttrs.deps,
|
||||||
Hdrs: baseAttributes.hdrs,
|
System_dynamic_deps: linkerAttrs.systemDynamicDeps,
|
||||||
|
Hdrs: baseAttributes.hdrs,
|
||||||
}
|
}
|
||||||
|
|
||||||
props := bazel.BazelTargetModuleProperties{
|
props := bazel.BazelTargetModuleProperties{
|
||||||
|
Reference in New Issue
Block a user