Work around reversed architecture specific includes am: adfc0a1a32 am: e5e4c49907 am: 1c444ad862
am: 005d9401da

Change-Id: I66c9354f7360def6a1225f77fc5a2748b13b7d09
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: {