Express no{,_lib}crt via features vs attrs
Given that we can map them directly to disabling the
corresponding Bazel features: `-{link_,use_lib}crt`
Test: Existing (adapted) Unit Tests
Test: bp2build.sh
Change-Id: Ib502f6fb929ace8e86a1001e3cc21f399317500c
diff --git a/bp2build/cc_binary_conversion_test.go b/bp2build/cc_binary_conversion_test.go
index fe156df..a39ed7d 100644
--- a/bp2build/cc_binary_conversion_test.go
+++ b/bp2build/cc_binary_conversion_test.go
@@ -365,7 +365,7 @@
{
description: "nocrt: true",
soongProperty: `nocrt: true,`,
- bazelAttr: AttrNameToString{"link_crt": `False`},
+ bazelAttr: AttrNameToString{"features": `["-link_crt"]`},
},
{
description: "nocrt: false",
@@ -408,12 +408,12 @@
{
description: "no_libcrt: true",
soongProperty: `no_libcrt: true,`,
- bazelAttr: AttrNameToString{"use_libcrt": `False`},
+ bazelAttr: AttrNameToString{"features": `["-use_libcrt"]`},
},
{
description: "no_libcrt: false",
soongProperty: `no_libcrt: false,`,
- bazelAttr: AttrNameToString{"use_libcrt": `True`},
+ bazelAttr: AttrNameToString{},
},
{
description: "no_libcrt: not set",