From dc03a8407e24b5524c0e9fc96336620815516991 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Wed, 22 Mar 2017 17:10:29 -0700 Subject: [PATCH 1/2] Remove -Wl,--allow-shlib-undefined from arm64 Hopefully this isn't needed any more. Test: m -j checkbuild Change-Id: I8cd1ef21c37bb85a322674532b3cd6816280da67 --- cc/config/arm64_device.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/cc/config/arm64_device.go b/cc/config/arm64_device.go index fe47ddfc0..23186e760 100644 --- a/cc/config/arm64_device.go +++ b/cc/config/arm64_device.go @@ -66,9 +66,6 @@ var ( "-fuse-ld=gold", "-Wl,--icf=safe", "-Wl,--no-undefined-version", - - // Disable transitive dependency library symbol resolving. - "-Wl,--allow-shlib-undefined", } arm64Cppflags = []string{ From a929db05b3de44b64dbcaeb2597423c671ac0db6 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 27 Mar 2017 16:27:50 -0700 Subject: [PATCH 2/2] Add support for test_suites property on cc_test modules Add a test_suites property that is passed through to make as LOCAL_COMPATIBILITY_SUITES. Test: m -j checkbuild, examine out/soong/Android-${TARGET_PRODUCT}.mk Bug: 35394669 Change-Id: If05b0f5f7d6dd85228546123bebe32859bcc8186 --- androidmk/cmd/androidmk/android.go | 1 + cc/androidmk.go | 8 ++++++++ cc/test.go | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/androidmk/cmd/androidmk/android.go b/androidmk/cmd/androidmk/android.go index 75c3eecd9..331bb4f40 100644 --- a/androidmk/cmd/androidmk/android.go +++ b/androidmk/cmd/androidmk/android.go @@ -103,6 +103,7 @@ func init() { "LOCAL_AIDL_INCLUDES": "aidl_includes", "LOCAL_AAPT_FLAGS": "aaptflags", "LOCAL_PACKAGE_SPLITS": "package_splits", + "LOCAL_COMPATIBILITY_SUITE": "test_suites", }) addStandardProperties(bpparser.BoolType, map[string]string{ diff --git a/cc/androidmk.go b/cc/androidmk.go index f45fbbe5e..7acc244b2 100644 --- a/cc/androidmk.go +++ b/cc/androidmk.go @@ -200,6 +200,14 @@ func (test *testBinary) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkDa ret.SubName = "_" + test.binaryDecorator.Properties.Stem } + ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error { + if len(test.Properties.Test_suites) > 0 { + fmt.Fprintln(w, "LOCAL_COMPATIBILITY_SUITES :=", + strings.Join(test.Properties.Test_suites, " ")) + } + return nil + }) + var testFiles []string for _, d := range test.data { rel := d.Rel() diff --git a/cc/test.go b/cc/test.go index d3556bf97..145b5b088 100644 --- a/cc/test.go +++ b/cc/test.go @@ -20,6 +20,7 @@ import ( "strings" "android/soong/android" + "github.com/google/blueprint" ) @@ -41,6 +42,10 @@ type TestBinaryProperties struct { // list of files or filegroup modules that provide data that should be installed alongside // the test Data []string + + // list of compatibility suites (for example "cts", "vts") that the module should be + // installed into. + Test_suites []string } func init() {