Incorporate cc_library_headers into mixed builds
Test: go soong tests Test: bp2build generate & sync; mixed build libc; mixed build su (su is an Android.mk target that relies on converted a cc_library_headers) Bug: 181552740 Change-Id: I9efd587970551fd41f642a208f0aa0a80e8694e0
This commit is contained in:
@@ -2,6 +2,7 @@ package cc
|
||||
|
||||
import (
|
||||
"android/soong/android"
|
||||
"android/soong/bazel/cquery"
|
||||
|
||||
"github.com/google/blueprint"
|
||||
)
|
||||
@@ -274,3 +275,15 @@ type FlagExporterInfo struct {
|
||||
}
|
||||
|
||||
var FlagExporterInfoProvider = blueprint.NewProvider(FlagExporterInfo{})
|
||||
|
||||
// flagExporterInfoFromCcInfo populates FlagExporterInfo provider with information from Bazel.
|
||||
func flagExporterInfoFromCcInfo(ctx android.ModuleContext, ccInfo cquery.CcInfo) FlagExporterInfo {
|
||||
|
||||
includes := android.PathsForBazelOut(ctx, ccInfo.Includes)
|
||||
systemIncludes := android.PathsForBazelOut(ctx, ccInfo.SystemIncludes)
|
||||
|
||||
return FlagExporterInfo{
|
||||
IncludeDirs: includes,
|
||||
SystemIncludeDirs: systemIncludes,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user