Work around reversed architecture specific includes
Soong is changing to prepend architecture specific include directories
to the shared include directories. This breaks libunwind, which
expects to find include/libunwind_i.h before
include/tdep-<arch>/libunwind_i.h. To keep the includes in the right
order, pass "include" as an architecture specific include for every
architecture.
Test: mega device build
Change-Id: I71626492c9b853414d853cd02de832fd30333896
diff --git a/Android.bp b/Android.bp
index 2c2c8e6..95d9cd3 100644
--- a/Android.bp
+++ b/Android.bp
@@ -38,24 +38,47 @@
"-DNDEBUG",
],
+ // libunwind expects to find include/libunwind_i.h before
+ // include/tdep-<arch>/libunwind_i.h, but soong prepends arch-specific
+ // include directories. To keep the include directories in the right
+ // order, pass "include" as an architecture specific include for every
+ // architecture.
arch: {
arm: {
- local_include_dirs: ["include/tdep-arm"],
+ local_include_dirs: [
+ "include",
+ "include/tdep-arm",
+ ],
},
arm64: {
- local_include_dirs: ["include/tdep-aarch64"],
+ local_include_dirs: [
+ "include",
+ "include/tdep-aarch64",
+ ],
},
mips: {
- local_include_dirs: ["include/tdep-mips"],
+ local_include_dirs: [
+ "include",
+ "include/tdep-mips",
+ ],
},
mips64: {
- local_include_dirs: ["include/tdep-mips"],
+ local_include_dirs: [
+ "include",
+ "include/tdep-mips",
+ ],
},
x86: {
- local_include_dirs: ["include/tdep-x86"],
+ local_include_dirs: [
+ "include",
+ "include/tdep-x86",
+ ],
},
x86_64: {
- local_include_dirs: ["include/tdep-x86_64"],
+ local_include_dirs: [
+ "include",
+ "include/tdep-x86_64",
+ ],
},
},
@@ -91,7 +114,6 @@
local_include_dirs: [
"src",
- "include",
],
}
@@ -172,7 +194,7 @@
"src/ptrace/_UPT_get_proc_name.c",
"src/ptrace/_UPT_reg_offset.c",
"src/ptrace/_UPT_resume.c",
- ],
+ ],
arch: {
arm: {