Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3fad8ed0 authored by Sam Delmerico's avatar Sam Delmerico
Browse files

convert cc_object crt property in bp2build

Bug: 263905692
Change-Id: I71e3fc4a42954c2d1f9f631d012949b81f4536de
parent ba46e766
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ func TestCcObjectSimple(t *testing.T) {
    exclude_srcs: ["a/b/exclude.c"],
    sdk_version: "current",
    min_sdk_version: "29",
	crt: true,
}
`,
		ExpectedBazelTargets: []string{
@@ -76,6 +77,7 @@ func TestCcObjectSimple(t *testing.T) {
				"system_dynamic_deps": `[]`,
				"sdk_version":         `"current"`,
				"min_sdk_version":     `"29"`,
				"crt":                 "True",
			}),
		},
	})
+2 −0
Original line number Diff line number Diff line
@@ -142,6 +142,7 @@ type bazelObjectAttributes struct {
	Absolute_includes   bazel.StringListAttribute
	Stl                 *string
	Linker_script       bazel.LabelAttribute
	Crt                 *bool
	sdkAttributes
}

@@ -208,6 +209,7 @@ func objectBp2Build(ctx android.TopDownMutatorContext, m *Module) {
		Absolute_includes:   compilerAttrs.absoluteIncludes,
		Stl:                 compilerAttrs.stl,
		Linker_script:       linkerScript,
		Crt:                 m.linker.(*objectLinker).Properties.Crt,
		sdkAttributes:       bp2BuildParseSdkAttributes(m),
	}