bp2build remove "-std" from cflags
Soong overrides "-std" flags when provided via cppflags or conlyflags; however, any user-provided "-std=" cflag will be overridden by Soong's std flag handling. For Bazel, we _always_ allow user to override via user provided flags. To prevent conflicts, we remove the silently ignored values from Android.bp files in the bp2build conversion. Test: build/bazel/ci/bp2build.sh Test: build/bazel/ci/mixed_droid.sh Change-Id: I4c33b2ae593a7ff3ff8e3ad15ef3461354fc0c83
This commit is contained in:
@@ -1433,3 +1433,21 @@ func TestCcLibraryStaticUseVersionLib(t *testing.T) {
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func TestCcLibraryStaticStdInFlags(t *testing.T) {
|
||||
runCcLibraryStaticTestCase(t, bp2buildTestCase{
|
||||
blueprint: soongCcProtoPreamble + `cc_library_static {
|
||||
name: "foo",
|
||||
cflags: ["-std=candcpp"],
|
||||
conlyflags: ["-std=conly"],
|
||||
cppflags: ["-std=cpp"],
|
||||
include_build_directory: false,
|
||||
}`,
|
||||
expectedBazelTargets: []string{
|
||||
makeBazelTarget("cc_library_static", "foo", attrNameToString{
|
||||
"conlyflags": `["-std=conly"]`,
|
||||
"cppflags": `["-std=cpp"]`,
|
||||
}),
|
||||
},
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user