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

Side by Side Diff: build/config/compiler/BUILD.gn

Issue 1231723002: Android GN: Include libstdc++.so when doing a component build (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn11
Patch Set: Fix create_native_executable_dist() not including lib paths Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « build/config/android/rules.gni ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/chrome_build.gni") 6 import("//build/config/chrome_build.gni")
7 if (current_cpu == "arm") { 7 if (current_cpu == "arm") {
8 import("//build/config/arm.gni") 8 import("//build/config/arm.gni")
9 } 9 }
10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { 10 if (current_cpu == "mipsel" || current_cpu == "mips64el") {
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 ldflags += [ "-Wl,--warn-shared-textrel" ] 644 ldflags += [ "-Wl,--warn-shared-textrel" ]
645 } 645 }
646 ldflags += [ "-nostdlib" ] 646 ldflags += [ "-nostdlib" ]
647 647
648 # NOTE: The libc++ header include paths below are specified in cflags 648 # NOTE: The libc++ header include paths below are specified in cflags
649 # rather than include_dirs because they need to come after include_dirs. 649 # rather than include_dirs because they need to come after include_dirs.
650 # Think of them like system headers, but don't use '-isystem' because the 650 # Think of them like system headers, but don't use '-isystem' because the
651 # arm-linux-androideabi-4.4.3 toolchain (circa Gingerbread) will exhibit 651 # arm-linux-androideabi-4.4.3 toolchain (circa Gingerbread) will exhibit
652 # strange errors. The include ordering here is important; change with 652 # strange errors. The include ordering here is important; change with
653 # caution. 653 # caution.
654 android_libcpp_root = "$android_ndk_root/sources/cxx-stl/llvm-libc++"
655
656 cflags += [ 654 cflags += [
657 "-isystem" + 655 "-isystem" +
658 rebase_path("$android_libcpp_root/libcxx/include", root_build_dir), 656 rebase_path("$android_libcpp_root/libcxx/include", root_build_dir),
659 "-isystem" + rebase_path( 657 "-isystem" + rebase_path(
660 "$android_ndk_root/sources/cxx-stl/llvm-libc++abi/libcxxabi/includ e", 658 "$android_ndk_root/sources/cxx-stl/llvm-libc++abi/libcxxabi/includ e",
661 root_build_dir), 659 root_build_dir),
662 "-isystem" + 660 "-isystem" +
663 rebase_path("$android_ndk_root/sources/android/support/include", 661 rebase_path("$android_ndk_root/sources/android/support/include",
664 root_build_dir), 662 root_build_dir),
665 ] 663 ]
666 664
667 lib_dirs += [ "$android_libcpp_root/libs/$android_app_abi" ] 665 lib_dirs += [ "$android_libcpp_root/libs/$android_app_abi" ]
668
669 if (component_mode == "shared_library") {
670 android_libcpp_library = "c++_shared"
671 } else {
672 android_libcpp_library = "c++_static"
673 }
674
675 libs += [ "$android_libcpp_library" ] 666 libs += [ "$android_libcpp_library" ]
676 667
677 if (current_cpu == "mipsel") { 668 if (current_cpu == "mipsel") {
678 libs += [ 669 libs += [
679 # ld linker is used for mips Android, and ld does not accept library 670 # ld linker is used for mips Android, and ld does not accept library
680 # absolute path prefixed by "-l"; Since libgcc does not exist in mips 671 # absolute path prefixed by "-l"; Since libgcc does not exist in mips
681 # sysroot the proper library will be linked. 672 # sysroot the proper library will be linked.
682 # TODO(gordanac): Remove once gold linker is used for mips Android. 673 # TODO(gordanac): Remove once gold linker is used for mips Android.
683 "gcc", 674 "gcc",
684 ] 675 ]
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 cflags += [ "-gsplit-dwarf" ] 1236 cflags += [ "-gsplit-dwarf" ]
1246 } 1237 }
1247 } 1238 }
1248 } 1239 }
1249 1240
1250 config("no_symbols") { 1241 config("no_symbols") {
1251 if (!is_win) { 1242 if (!is_win) {
1252 cflags = [ "-g0" ] 1243 cflags = [ "-g0" ]
1253 } 1244 }
1254 } 1245 }
OLDNEW
« no previous file with comments | « build/config/android/rules.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698