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
diff --git a/cc/binary.go b/cc/binary.go
index 9262f21..89e7262 100644
--- a/cc/binary.go
+++ b/cc/binary.go
@@ -630,6 +630,8 @@
},
Features: baseAttrs.features,
+
+ sdkAttributes: bp2BuildParseSdkAttributes(m),
}
ctx.CreateBazelTargetModule(bazel.BazelTargetModuleProperties{
@@ -673,4 +675,6 @@
Strip stripAttributes
Features bazel.StringListAttribute
+
+ sdkAttributes
}