diff --git a/libunwindstack/Android.bp b/libunwindstack/Android.bp index f3d3f2745..bf7d69e5d 100644 --- a/libunwindstack/Android.bp +++ b/libunwindstack/Android.bp @@ -75,29 +75,13 @@ cc_defaults { ], target: { + // Always disable optimizations for host to make it easier to debug. host: { - // Always disable optimizations for host to make it easier to debug. cflags: [ "-O0", "-g", ], }, - android: { - header_libs: ["bionic_libc_platform_headers"], - product_variables: { - experimental_mte: { - cflags: ["-DANDROID_EXPERIMENTAL_MTE"], - }, - }, - }, - linux_bionic: { - header_libs: ["bionic_libc_platform_headers"], - product_variables: { - experimental_mte: { - cflags: ["-DANDROID_EXPERIMENTAL_MTE"], - }, - }, - }, }, arch: { @@ -118,6 +102,16 @@ cc_defaults { "liblog", "liblzma", ], + + header_libs: [ + "bionic_libc_platform_headers", + ], + + product_variables: { + experimental_mte: { + cflags: ["-DANDROID_EXPERIMENTAL_MTE"], + }, + }, } cc_library { @@ -287,22 +281,13 @@ cc_defaults { "tests/files/offline/straddle_arm64/*", ], - target: { - android: { - header_libs: ["bionic_libc_platform_headers"], - product_variables: { - experimental_mte: { - cflags: ["-DANDROID_EXPERIMENTAL_MTE"], - }, - }, - }, - linux_bionic: { - header_libs: ["bionic_libc_platform_headers"], - product_variables: { - experimental_mte: { - cflags: ["-DANDROID_EXPERIMENTAL_MTE"], - }, - }, + header_libs: [ + "bionic_libc_platform_headers", + ], + + product_variables: { + experimental_mte: { + cflags: ["-DANDROID_EXPERIMENTAL_MTE"], }, }, } diff --git a/libunwindstack/tests/MemoryRemoteTest.cpp b/libunwindstack/tests/MemoryRemoteTest.cpp index 621893b1f..385078dca 100644 --- a/libunwindstack/tests/MemoryRemoteTest.cpp +++ b/libunwindstack/tests/MemoryRemoteTest.cpp @@ -28,6 +28,8 @@ #include #include +#include +#include #include #include "MemoryRemote.h"