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

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

Issue 2596873002: [Android] Support compiling with NDK r13b. (Closed)
Patch Set: Created 4 years 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 | « no previous file | build/config/android/config.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/android/BUILD.gn
diff --git a/build/config/android/BUILD.gn b/build/config/android/BUILD.gn
index e4837d4d99ce412c4457d06521c090c1d8360178..8b42a2ec0afe12f4e16b9d9724e2fb8bb81cc394 100644
--- a/build/config/android/BUILD.gn
+++ b/build/config/android/BUILD.gn
@@ -96,12 +96,30 @@ config("runtime_library") {
# arm-linux-androideabi-4.4.3 toolchain (circa Gingerbread) will exhibit
# strange errors. The include ordering here is important; change with
# caution.
- cflags_cc = [
- "-isystem" +
- rebase_path("$android_libcpp_root/libcxx/include", root_build_dir),
- "-isystem" + rebase_path(
+ cflags_cc = []
+ if (android_ndk_major_version >= 13) {
+ libcxx_include_path =
+ rebase_path("$android_libcpp_root/include", root_build_dir)
+ libcxxabi_include_path =
+ rebase_path("$android_ndk_root/sources/cxx-stl/llvm-libc++abi/include",
+ root_build_dir)
+
+ if (!is_clang) {
+ # Per the release notes, GCC is not supported in the NDK starting with
+ # r13. It's still present, though, and has conflicting declarations of
+ # float abs(float).
+ cflags_cc += [ "-Wno-attributes" ]
+ }
+ } else {
+ libcxx_include_path =
+ rebase_path("$android_libcpp_root/libcxx/include", root_build_dir)
+ libcxxabi_include_path = rebase_path(
"$android_ndk_root/sources/cxx-stl/llvm-libc++abi/libcxxabi/include",
- root_build_dir),
+ root_build_dir)
+ }
+ cflags_cc += [
+ "-isystem" + libcxx_include_path,
+ "-isystem" + libcxxabi_include_path,
"-isystem" +
rebase_path("$android_ndk_root/sources/android/support/include",
root_build_dir),
« no previous file with comments | « no previous file | build/config/android/config.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698