Mixed builds: propagate includes from cc_* targets
This allows us to remove libasync_safe from the mixed builds denylist. Test: mixed_libc.sh CI script Change-Id: Ibafd231284864078bf30340f919d39e5098843ce
This commit is contained in:
@@ -221,7 +221,6 @@ var (
|
|||||||
// Per-module denylist to opt modules out of mixed builds. Such modules will
|
// Per-module denylist to opt modules out of mixed builds. Such modules will
|
||||||
// still be generated via bp2build.
|
// still be generated via bp2build.
|
||||||
mixedBuildsDisabledList = []string{
|
mixedBuildsDisabledList = []string{
|
||||||
"libasync_safe", // lberki@, cc_library_static, 'async_safe/log.h not found' for out/combined-aosp_arm64.ninja out/soong/.intermediates/system/unwinding/libbacktrace/libbacktrace/android_arm64_armv8-a_shared/obj/system/unwinding/libbacktrace/ThreadEntry.o
|
|
||||||
"libc_gdtoa", // ruperts@, cc_library_static, OK for bp2build but undefined symbol: __strtorQ for mixed builds
|
"libc_gdtoa", // ruperts@, cc_library_static, OK for bp2build but undefined symbol: __strtorQ for mixed builds
|
||||||
"libc_netbsd", // lberki@, cc_library_static, version script assignment of 'LIBC_PRIVATE' to symbol 'SHA1Final' failed: symbol not defined
|
"libc_netbsd", // lberki@, cc_library_static, version script assignment of 'LIBC_PRIVATE' to symbol 'SHA1Final' failed: symbol not defined
|
||||||
"libc_openbsd", // ruperts@, cc_library_static, OK for bp2build but error: duplicate symbol: strcpy for mixed builds
|
"libc_openbsd", // ruperts@, cc_library_static, OK for bp2build but error: duplicate symbol: strcpy for mixed builds
|
||||||
|
@@ -402,10 +402,17 @@ func (f *flagExporter) addExportedGeneratedHeaders(headers ...android.Path) {
|
|||||||
|
|
||||||
func (f *flagExporter) setProvider(ctx android.ModuleContext) {
|
func (f *flagExporter) setProvider(ctx android.ModuleContext) {
|
||||||
ctx.SetProvider(FlagExporterInfoProvider, FlagExporterInfo{
|
ctx.SetProvider(FlagExporterInfoProvider, FlagExporterInfo{
|
||||||
|
// Comes from Export_include_dirs property, and those of exported transitive deps
|
||||||
IncludeDirs: android.FirstUniquePaths(f.dirs),
|
IncludeDirs: android.FirstUniquePaths(f.dirs),
|
||||||
|
// Comes from Export_system_include_dirs property, and those of exported transitive deps
|
||||||
SystemIncludeDirs: android.FirstUniquePaths(f.systemDirs),
|
SystemIncludeDirs: android.FirstUniquePaths(f.systemDirs),
|
||||||
|
// Used in very few places as a one-off way of adding extra defines.
|
||||||
Flags: f.flags,
|
Flags: f.flags,
|
||||||
|
// Used sparingly, for extra files that need to be explicitly exported to dependers,
|
||||||
|
// or for phony files to minimize ninja.
|
||||||
Deps: f.deps,
|
Deps: f.deps,
|
||||||
|
// For exported generated headers, such as exported aidl headers, proto headers, or
|
||||||
|
// sysprop headers.
|
||||||
GeneratedHeaders: f.headers,
|
GeneratedHeaders: f.headers,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -524,6 +531,8 @@ func (handler *staticLibraryBazelHandler) generateBazelBuildActions(ctx android.
|
|||||||
Direct(outputFilePath).
|
Direct(outputFilePath).
|
||||||
Build(),
|
Build(),
|
||||||
})
|
})
|
||||||
|
|
||||||
|
ctx.SetProvider(FlagExporterInfoProvider, flagExporterInfoFromCcInfo(ctx, ccInfo))
|
||||||
if i, ok := handler.module.linker.(snapshotLibraryInterface); ok {
|
if i, ok := handler.module.linker.(snapshotLibraryInterface); ok {
|
||||||
// Dependencies on this library will expect collectedSnapshotHeaders to
|
// Dependencies on this library will expect collectedSnapshotHeaders to
|
||||||
// be set, otherwise validation will fail. For now, set this to an empty
|
// be set, otherwise validation will fail. For now, set this to an empty
|
||||||
|
@@ -283,7 +283,7 @@ func flagExporterInfoFromCcInfo(ctx android.ModuleContext, ccInfo cquery.CcInfo)
|
|||||||
systemIncludes := android.PathsForBazelOut(ctx, ccInfo.SystemIncludes)
|
systemIncludes := android.PathsForBazelOut(ctx, ccInfo.SystemIncludes)
|
||||||
|
|
||||||
return FlagExporterInfo{
|
return FlagExporterInfo{
|
||||||
IncludeDirs: includes,
|
IncludeDirs: android.FirstUniquePaths(includes),
|
||||||
SystemIncludeDirs: systemIncludes,
|
SystemIncludeDirs: android.FirstUniquePaths(systemIncludes),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user