Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(453)

Unified Diff: build/config/compiler/BUILD.gn

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/android/rules.gni ('k') | build/config/sysroot.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index b50a64c2595049a735f91314a33571e2c674ed1a..164b97d26260f3e238834c36ffad1e9e53037f5c 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -380,8 +380,10 @@ config("compiler") {
# https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
# Only apply this to the target linker, since the host
# linker might not be gold, but isn't used much anyway.
- "-Wl,--threads",
- "-Wl,--thread-count=4",
+ # TODO(raymes): Disable threading because gold is frequently
+ # crashing on the bots: crbug.com/161942.
+ #"-Wl,--threads",
+ #"-Wl,--thread-count=4",
]
}
@@ -529,7 +531,7 @@ config("runtime_library") {
]
}
- # Android standard library setup.
+ # Stlport setup. Android uses a different (smaller) version of the STL.
if (is_android) {
if (is_clang) {
# Work around incompatibilities between bionic and clang headers.
@@ -539,44 +541,55 @@ config("runtime_library") {
]
}
- defines += [ "__GNU_SOURCE=1" ] # Necessary for clone().
+ defines += [
+ "USE_STLPORT=1",
+ "_STLP_USE_PTR_SPECIALIZATIONS=1",
+ "__GNU_SOURCE=1", # Necessary for clone().
+ ]
ldflags += [
"-Wl,--warn-shared-textrel",
"-nostdlib",
]
- android_libcpp_root = "$android_ndk_root/sources/cxx-stl/llvm-libc++"
+ # NOTE: The stlport header include paths below are specified in cflags
+ # rather than include_dirs because they need to come after include_dirs.
+ # Think of them like system headers, but don't use '-isystem' because the
+ # arm-linux-androideabi-4.4.3 toolchain (circa Gingerbread) will exhibit
+ # strange errors. The include ordering here is important; change with
+ # caution.
+ android_stlport_root = "$android_ndk_root/sources/cxx-stl/stlport"
- cflags += [
- "-isystem" +
- rebase_path("$android_libcpp_root/libcxx/include", root_build_dir),
- "-isystem" + rebase_path(
- "$android_ndk_root/sources/cxx-stl/llvm-libc++abi/libcxxabi/include",
- root_build_dir),
- "-isystem" +
- rebase_path("$android_ndk_root/sources/android/support/include",
- root_build_dir),
- ]
-
- lib_dirs += [ "$android_libcpp_root/libs/$android_app_abi" ]
+ cflags += [ "-isystem" +
+ rebase_path("$android_stlport_root/stlport", root_build_dir) ]
+ lib_dirs += [ "$android_stlport_root/libs/$android_app_abi" ]
if (component_mode == "shared_library") {
- android_libcpp_library = "c++_shared"
+ libs += [ "stlport_shared" ]
} else {
- android_libcpp_library = "c++_static"
+ libs += [ "stlport_static" ]
}
- libs += [
- "$android_libcpp_library",
- "atomic",
+ if (cpu_arch == "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.
- rebase_path(android_libgcc_file),
- "m",
+ libs += [
"c",
"dl",
+ "m",
]
}
}
« no previous file with comments | « build/config/android/rules.gni ('k') | build/config/sysroot.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698