Merge v0.6.0 into master.
Adjust Android build system rules for recent changes in upstream
cpu_features.
Test: lunch aosp_arm-eng \
&& mmma external/cpu_features \
&& atest --test-mapping external/cpu_features:all
Test: lunch aosp_arm64-eng \
&& mmma external/cpu_features \
&& atest --test-mapping external/cpu_features:all
Test: lunch aosp_x86-eng \
&& mmma external/cpu_features \
&& atest --test-mapping external/cpu_features:all
Test: lunch aosp_x86_64-eng \
&& mmma external/cpu_features
Bug: 169921883
Bug: 128901000
Change-Id: I5fa712b4ea6e52f60128fb0c907a52cd894f34f1
diff --git a/Android.bp b/Android.bp
index df66e37..a6d18b2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -34,11 +34,10 @@
}
cc_library {
- name: "libcpu_features-unix_based_hardware_detection",
+ name: "libcpu_features-hwcaps",
defaults: ["cpu_features-defaults"],
srcs: [
"src/hwcaps.c",
- "src/unix_features_aggregator.c",
],
cflags: [
"-DHAVE_DLFCN_H",
@@ -74,7 +73,7 @@
"src/cpuinfo_arm.c",
],
whole_static_libs: [
- "libcpu_features-unix_based_hardware_detection",
+ "libcpu_features-hwcaps",
],
},
arm64: {
@@ -82,7 +81,7 @@
"src/cpuinfo_aarch64.c",
],
whole_static_libs: [
- "libcpu_features-unix_based_hardware_detection",
+ "libcpu_features-hwcaps",
],
cflags: [
"-Wno-gnu-designator",
@@ -186,8 +185,10 @@
defaults: ["cpu_features-test-defaults"],
cflags: [
"-DCPU_FEATURES_MOCK_GET_ELF_HWCAP_FROM_GETAUXVAL",
+ "-DCPU_FEATURES_TEST",
],
srcs: [
+ "src/hwcaps.c",
"test/hwcaps_for_testing.cc",
],
static_libs: [
@@ -239,9 +240,6 @@
"cpu_features-test-defaults",
"stack_line_reader-defaults",
],
- srcs: [
- "src/unix_features_aggregator.c",
- ],
whole_static_libs: [
"libcpu_features-filesystem_for_testing",
"libcpu_features-hwcaps_for_testing",
@@ -290,17 +288,6 @@
}
cc_test {
- name: "cpu_features-unix_features_aggregator_test",
- defaults: ["cpu_features-test-defaults"],
- srcs: [
- "test/unix_features_aggregator_test.cc",
- ],
- static_libs: [
- "libcpu_features-all_libraries",
- ],
-}
-
-cc_test {
name: "cpu_features-cpuinfo_test",
defaults: [
"cpu_features-test-defaults",
@@ -308,6 +295,9 @@
static_libs: [
"libcpu_features-all_libraries",
],
+ cflags: [
+ "-DSTACK_LINE_READER_BUFFER_SIZE=1024",
+ ],
arch: {
x86: {
cflags: [
@@ -330,9 +320,6 @@
],
},
arm: {
- cflags: [
- "-DSTACK_LINE_READER_BUFFER_SIZE=1024",
- ],
srcs: [
"test/cpuinfo_arm_test.cc",
"src/cpuinfo_arm.c",
@@ -340,7 +327,6 @@
},
arm64: {
cflags: [
- "-DSTACK_LINE_READER_BUFFER_SIZE=1024",
"-Wno-gnu-designator",
],
srcs: [