Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index 164b97d26260f3e238834c36ffad1e9e53037f5c..9e98c16a839a8a70a3f0f1f68b23699a8040957d 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -531,7 +531,7 @@ config("runtime_library") { |
] |
} |
- # Stlport setup. Android uses a different (smaller) version of the STL. |
+ # Android setup. |
Fabrice (no longer in Chrome)
2015/02/04 13:24:23
This is specifically for standard library and link
jdduke (slow)
2015/02/05 18:37:15
Done.
|
if (is_android) { |
if (is_clang) { |
# Work around incompatibilities between bionic and clang headers. |
@@ -541,55 +541,38 @@ config("runtime_library") { |
] |
} |
- defines += [ |
- "USE_STLPORT=1", |
- "_STLP_USE_PTR_SPECIALIZATIONS=1", |
- "__GNU_SOURCE=1", # Necessary for clone(). |
- ] |
+ defines += [ "__GNU_SOURCE=1" ] # Necessary for clone(). |
Fabrice (no longer in Chrome)
2015/02/04 13:24:23
I am not sure if this would not be better fitted f
jdduke (slow)
2015/02/05 18:37:15
Do we even need __GNU_SOURCE any longer? I'll try
|
ldflags += [ |
"-Wl,--warn-shared-textrel", |
"-nostdlib", |
] |
- # 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_stlport_root/stlport", root_build_dir) ] |
- lib_dirs += [ "$android_stlport_root/libs/$android_app_abi" ] |
- |
- if (component_mode == "shared_library") { |
- libs += [ "stlport_shared" ] |
- } else { |
- libs += [ "stlport_static" ] |
- } |
+ # Libc++ setup. |
Fabrice (no longer in Chrome)
2015/02/04 13:24:23
This can go away if you change the above comment.
jdduke (slow)
2015/02/05 18:37:15
Done.
|
+ android_libcpp_root = "$android_ndk_root/sources/cxx-stl/llvm-libc++" |
- 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), |
- ] |
- } |
+ 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" ] |
libs += [ |
+ "$android_libcpp_library", |
+ "atomic", |
+ |
+ # 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", |
"c", |
"dl", |
- "m", |
] |
} |
} |