aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-05-08 07:23:23 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-05-08 07:23:23 +0000
commit081cb096b7fc2e25a6e809b4767fb888e1748dae (patch)
tree102042b8625bc8404944d1df2a6e6b539a396b09
parent5709ccd0251e4806cf826a1472c6292ebb3a9790 (diff)
parent8fe13b971fe3ceff9e1fcbb9089e417dbeb17366 (diff)
downloadbuild_soong-081cb096b7fc2e25a6e809b4767fb888e1748dae.tar.gz
build_soong-081cb096b7fc2e25a6e809b4767fb888e1748dae.tar.bz2
build_soong-081cb096b7fc2e25a6e809b4767fb888e1748dae.zip
Snap for 4767765 from 8fe13b971fe3ceff9e1fcbb9089e417dbeb17366 to pi-release
Change-Id: I4de1b778101ccff8f7cfb7ab3725b7c590328798
-rw-r--r--androidmk/cmd/androidmk/androidmk_test.go13
-rw-r--r--bpfix/bpfix/bpfix.go5
2 files changed, 18 insertions, 0 deletions
diff --git a/androidmk/cmd/androidmk/androidmk_test.go b/androidmk/cmd/androidmk/androidmk_test.go
index edf3d42f..37e2427c 100644
--- a/androidmk/cmd/androidmk/androidmk_test.go
+++ b/androidmk/cmd/androidmk/androidmk_test.go
@@ -576,6 +576,19 @@ include $(call all-makefiles-under,$(LOCAL_PATH))
}
`,
},
+ {
+ desc: "cc_library shared_libs",
+ in: `
+ include $(CLEAR_VARS)
+ LOCAL_SHARED_LIBRARIES := libfoo
+ include $(BUILD_SHARED_LIBRARY)
+ `,
+ expected: `
+ cc_library_shared {
+ shared_libs: ["libfoo"],
+ }
+ `,
+ },
}
func TestEndToEnd(t *testing.T) {
diff --git a/bpfix/bpfix/bpfix.go b/bpfix/bpfix/bpfix.go
index e4d4e34e..d5c318c5 100644
--- a/bpfix/bpfix/bpfix.go
+++ b/bpfix/bpfix/bpfix.go
@@ -22,6 +22,7 @@ import (
"fmt"
"io"
"path/filepath"
+ "strings"
"github.com/google/blueprint/parser"
)
@@ -220,6 +221,10 @@ func (f *Fixer) rewriteIncorrectAndroidmkAndroidLibraries() error {
continue
}
+ if !strings.HasPrefix(mod.Type, "java_") && !strings.HasPrefix(mod.Type, "android_") {
+ continue
+ }
+
hasAndroidLibraries := hasNonEmptyLiteralListProperty(mod, "android_libs")
hasStaticAndroidLibraries := hasNonEmptyLiteralListProperty(mod, "android_static_libs")
hasResourceDirs := hasNonEmptyLiteralListProperty(mod, "resource_dirs")