Escape cc ldflags in bp2build conversion

Bug: 217757720
Test: bp2build.sh
Change-Id: I704acfb01527f15ff762afeaaf4e0e328e4737d8
This commit is contained in:
Liz Kammer
2022-02-04 15:39:00 -05:00
parent cc1a2062f0
commit f38a8379ff
2 changed files with 16 additions and 1 deletions

View File

@@ -2409,3 +2409,18 @@ cc_library {
},
)
}
func TestCcLibraryEscapeLdflags(t *testing.T) {
runCcLibraryTestCase(t, bp2buildTestCase{
moduleTypeUnderTest: "cc_library",
moduleTypeUnderTestFactory: cc.LibraryFactory,
blueprint: soongCcProtoPreamble + `cc_library {
name: "foo",
ldflags: ["-Wl,--rpath,${ORIGIN}"],
include_build_directory: false,
}`,
expectedBazelTargets: makeCcLibraryTargets("foo", attrNameToString{
"linkopts": `["-Wl,--rpath,$${ORIGIN}"]`,
}),
})
}