Support tailoring clang --target flag based on min sdk version.
Bug: 215748260 Test: Tested using aquery to verify the --target flag; add added unit Change-Id: Ifb13509db7d1e110316aa44d55ec9cccaa4b83d1
This commit is contained in:
@@ -52,6 +52,8 @@ type staticOrSharedAttributes struct {
|
||||
System_dynamic_deps bazel.LabelListAttribute
|
||||
|
||||
Enabled bazel.BoolAttribute
|
||||
|
||||
sdkAttributes
|
||||
}
|
||||
|
||||
// groupSrcsByExtension partitions `srcs` into groups based on file extension.
|
||||
@@ -539,6 +541,18 @@ func bp2BuildParseBaseProps(ctx android.Bp2buildMutatorContext, module *Module)
|
||||
}
|
||||
}
|
||||
|
||||
func bp2BuildParseSdkAttributes(module *Module) sdkAttributes {
|
||||
return sdkAttributes {
|
||||
Sdk_version: module.Properties.Sdk_version,
|
||||
Min_sdk_version: module.Properties.Min_sdk_version,
|
||||
}
|
||||
}
|
||||
|
||||
type sdkAttributes struct {
|
||||
Sdk_version *string
|
||||
Min_sdk_version *string
|
||||
}
|
||||
|
||||
// Convenience struct to hold all attributes parsed from linker properties.
|
||||
type linkerAttributes struct {
|
||||
deps bazel.LabelListAttribute
|
||||
|
Reference in New Issue
Block a user