summaryrefslogtreecommitdiffstats
path: root/build/config
diff options
context:
space:
mode:
authoragrieve <agrieve@chromium.org>2016-01-06 11:28:06 -0800
committerCommit bot <commit-bot@chromium.org>2016-01-06 19:29:01 +0000
commit8d8895cc227d9247c1172f235603c23d0be15ab4 (patch)
treef145b1198ecc01b58a7373839473dc6aa9842807 /build/config
parent99bee701be8f114c76ef82a1b9116ee9d6676793 (diff)
downloadchromium_src-8d8895cc227d9247c1172f235603c23d0be15ab4.zip
chromium_src-8d8895cc227d9247c1172f235603c23d0be15ab4.tar.gz
chromium_src-8d8895cc227d9247c1172f235603c23d0be15ab4.tar.bz2
GN(android): Simplify android default libs logic
* Always use full path to libgcc.a * Specify libs c, dl, m only once in either default_libs or runtime_library Should be a no-op. BUG=570406 Review URL: https://codereview.chromium.org/1539353002 Cr-Commit-Position: refs/heads/master@{#367877}
Diffstat (limited to 'build/config')
-rw-r--r--build/config/BUILD.gn8
-rw-r--r--build/config/android/BUILD.gn32
2 files changed, 8 insertions, 32 deletions
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn
index 18bd775..195293b 100644
--- a/build/config/BUILD.gn
+++ b/build/config/BUILD.gn
@@ -363,15 +363,7 @@ config("default_libs") {
# target that needs it.
]
} else if (is_android) {
- # Android uses -nostdlib so we need to add even libc here.
libs = [
- # TODO(brettw) write a version of this, hopefully we can express this
- # without forking out to GCC just to get the library name. The android
- # toolchain directory should probably be extracted into a .gni file that
- # this file and the android toolchain .gn file can share.
- # # Manually link the libgcc.a that the cross compiler uses.
- # '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
- "c",
"dl",
"m",
]
diff --git a/build/config/android/BUILD.gn b/build/config/android/BUILD.gn
index ec80f23..22a6075 100644
--- a/build/config/android/BUILD.gn
+++ b/build/config/android/BUILD.gn
@@ -154,29 +154,18 @@ config("runtime_library") {
libs = [ "c++_static" ]
}
- # libgcc must come before libdl for ld.bfd (MIPS)
- if (current_cpu == "mipsel") {
- libs += [
- # ld linker is used for mips Android, and ld does not accept library
- # absolute path prefixed by "-l"; Since libgcc does not exist in mips
- # sysroot the proper library will be linked.
- # TODO(gordanac): Remove once gold linker is used for mips Android.
- "gcc",
- ]
- } else {
- libs += [
- # Manually link the libgcc.a that the cross compiler uses. This is
- # absolute because the linker will look inside the sysroot if it's not.
- rebase_path(android_libgcc_file),
- ]
- }
-
+ # Manually link the libgcc.a that the cross compiler uses. This is
+ # absolute because the linker will look inside the sysroot if it's not.
libs += [
+ rebase_path(android_libgcc_file),
"c",
- "dl",
- "m",
]
+ # Clang with libc++ does not require an explicit atomic library reference.
+ if (!is_clang) {
+ libs += [ "atomic" ]
+ }
+
if (is_clang) {
# Work around incompatibilities between bionic and clang headers.
defines += [
@@ -190,11 +179,6 @@ config("runtime_library") {
if (current_cpu != "mipsel" && current_cpu != "mips64el") {
ldflags += [ "-Wl,--warn-shared-textrel" ]
}
-
- # Clang with libc++ does not require an explicit atomic library reference.
- if (!is_clang) {
- libs += [ "atomic" ]
- }
}
config("executable_config") {