aboutsummaryrefslogtreecommitdiffstats
path: root/apex/apex_test.go
diff options
context:
space:
mode:
authorJiyong Park <jiyong@google.com>2018-12-13 18:37:29 +0900
committerJiyong Park <jiyong@google.com>2018-12-15 23:03:47 +0900
commit6437995170641ff6b1f50a6e2596a10ad91f3450 (patch)
treed343244e347fc82f3edd7da465df3ba971254b4d /apex/apex_test.go
parent1ee00b54d99b580b604db9a62e578dd51be4bed2 (diff)
downloadandroid_build_soong-6437995170641ff6b1f50a6e2596a10ad91f3450.tar.gz
android_build_soong-6437995170641ff6b1f50a6e2596a10ad91f3450.tar.bz2
android_build_soong-6437995170641ff6b1f50a6e2596a10ad91f3450.zip
Remove -include <file> when compiling stubs.
Otherwise, the force included headers might cause conflicting types error with the symbols in the generated stubs source code. e.g. double acos(double); // in header void acos() {} // in the generated source code Bug: 120266448 Test: m (apex_test also updated, and passing) Change-Id: I717df990959d1b24ec515f0f52a4e28b94e92f32
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r--apex/apex_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go
index 72f6488c..88c57bc0 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -267,6 +267,7 @@ func TestApexWithStubs(t *testing.T) {
cc_library {
name: "mylib2",
srcs: ["mylib.cpp"],
+ cflags: ["-include mylib.h"],
system_shared_libs: [],
stl: "none",
stubs: {
@@ -316,6 +317,10 @@ func TestApexWithStubs(t *testing.T) {
ensureContains(t, mylibLdFlags, "mylib3/android_arm64_armv8-a_shared_myapex/mylib3.so")
// .. and not linking to the stubs variant of mylib3
ensureNotContains(t, mylibLdFlags, "mylib3/android_arm64_armv8-a_shared_12_myapex/mylib3.so")
+
+ // Ensure that stubs libs are built without -include flags
+ mylib2Cflags := ctx.ModuleForTests("mylib2", "android_arm64_armv8-a_static_myapex").Rule("cc").Args["cFlags"]
+ ensureNotContains(t, mylib2Cflags, "-include ")
}
func TestApexWithExplicitStubsDependency(t *testing.T) {