Use target.linux for all linux kernel based targets

Now in Android.bp files, target.linux applies to all targets running a
linux kernel (android, linux_glibc, linux_bionic). So common
flags/sources/etc can be combined instead of copying them to each
target.

Test: m
Change-Id: If7ad138ea1c540c160731f86b6ccc0daa5c69b83
This commit is contained in:
Dan Willemsen 2017-10-03 14:17:31 -07:00
parent 06254de12a
commit bdddcab3bd
4 changed files with 19 additions and 66 deletions

View File

@ -64,16 +64,20 @@ cc_library {
target: {
android: {
srcs: [
"errors_unix.cpp",
"properties.cpp",
"chrono_utils.cpp",
],
cppflags: ["-Wexit-time-destructors"],
sanitize: {
misc_undefined: ["integer"],
},
},
linux: {
srcs: [
"chrono_utils.cpp",
"errors_unix.cpp",
],
cppflags: ["-Wexit-time-destructors"],
},
darwin: {
srcs: [
"chrono_utils.cpp",
@ -82,20 +86,8 @@ cc_library {
cppflags: ["-Wexit-time-destructors"],
},
linux_bionic: {
srcs: [
"chrono_utils.cpp",
"errors_unix.cpp",
],
cppflags: ["-Wexit-time-destructors"],
enabled: true,
},
linux_glibc: {
srcs: [
"chrono_utils.cpp",
"errors_unix.cpp",
],
cppflags: ["-Wexit-time-destructors"],
},
windows: {
srcs: [
"errors_windows.cpp",
@ -127,15 +119,12 @@ cc_test {
],
target: {
android: {
srcs: [
"chrono_utils_test.cpp",
"properties_test.cpp"
],
srcs: ["properties_test.cpp"],
sanitize: {
misc_undefined: ["integer"],
},
},
linux_glibc: {
linux: {
srcs: ["chrono_utils_test.cpp"],
},
windows: {

View File

@ -83,20 +83,7 @@ cc_library {
darwin: {
enabled: true,
},
linux_glibc: {
srcs: libbacktrace_sources,
shared_libs: [
"libbase",
"liblog",
"libunwind",
"libunwindstack",
],
static_libs: ["libcutils"],
},
linux_bionic: {
enabled: true,
linux: {
srcs: libbacktrace_sources,
shared_libs: [
@ -109,16 +96,7 @@ cc_library {
static_libs: ["libcutils"],
},
android: {
srcs: libbacktrace_sources,
shared_libs: [
"libbase",
"liblog",
"libunwind",
"libunwindstack",
],
static_libs: ["libasync_safe", "libcutils"],
static_libs: ["libasync_safe"],
},
},
whole_static_libs: ["libdemangle"],
@ -135,13 +113,7 @@ cc_library_shared {
srcs: ["backtrace_testlib.cpp"],
target: {
linux_glibc: {
shared_libs: [
"libunwind",
"libunwindstack",
],
},
android: {
linux: {
shared_libs: [
"libunwind",
"libunwindstack",

View File

@ -93,8 +93,6 @@ cc_library {
target: {
android: {
srcs: [
"Looper.cpp",
"ProcessCallStack.cpp",
"Trace.cpp",
],
@ -112,6 +110,12 @@ cc_library {
misc_undefined: ["integer"],
},
},
linux: {
srcs: [
"Looper.cpp",
"ProcessCallStack.cpp",
],
},
host: {
cflags: ["-DLIBUTILS_NATIVE=1"],
@ -121,18 +125,8 @@ cc_library {
},
},
linux_glibc: {
srcs: [
"Looper.cpp",
"ProcessCallStack.cpp",
],
},
linux_bionic: {
enabled: true,
srcs: [
"Looper.cpp",
"ProcessCallStack.cpp",
],
},
darwin: {

View File

@ -34,8 +34,6 @@ cc_test {
target: {
android: {
srcs: [
"Looper_test.cpp",
"RefBase_test.cpp",
"SystemClock_test.cpp",
],
shared_libs: [
@ -46,7 +44,7 @@ cc_test {
"libbase",
],
},
linux_glibc: {
linux: {
srcs: [
"Looper_test.cpp",
"RefBase_test.cpp",