OLD | NEW |
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 if (cpu_arch == "arm") { | 6 if (cpu_arch == "arm") { |
7 import("//build/config/arm.gni") | 7 import("//build/config/arm.gni") |
8 } | 8 } |
9 if (is_posix) { | 9 if (is_posix) { |
10 import("//build/config/gcc/gcc_version.gni") | 10 import("//build/config/gcc/gcc_version.gni") |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 "-Wl,--warn-shared-textrel", | 451 "-Wl,--warn-shared-textrel", |
452 "-nostdlib", | 452 "-nostdlib", |
453 ] | 453 ] |
454 | 454 |
455 # NOTE: The stlport header include paths below are specified in cflags | 455 # NOTE: The stlport header include paths below are specified in cflags |
456 # rather than include_dirs because they need to come after include_dirs. | 456 # rather than include_dirs because they need to come after include_dirs. |
457 # Think of them like system headers, but don't use '-isystem' because the | 457 # Think of them like system headers, but don't use '-isystem' because the |
458 # arm-linux-androideabi-4.4.3 toolchain (circa Gingerbread) will exhibit | 458 # arm-linux-androideabi-4.4.3 toolchain (circa Gingerbread) will exhibit |
459 # strange errors. The include ordering here is important; change with | 459 # strange errors. The include ordering here is important; change with |
460 # caution. | 460 # caution. |
461 if (use_system_stlport) { | 461 android_stlport_root = "$android_ndk_root/sources/cxx-stl/stlport" |
462 cflags += [ | 462 |
463 # For libstdc++/include, which is used by stlport. | 463 cflags += [ |
464 "-I" + rebase_path("$android_src/bionic", root_build_dir), | 464 "-isystem" + rebase_path("$android_stlport_root/stlport", |
465 "-I" + rebase_path("$android_src/external/stlport/stlport", | 465 root_build_dir) |
466 root_build_dir), | 466 ] |
467 ] | 467 lib_dirs += [ "$android_stlport_root/libs/$android_app_abi" ] |
468 libs += [ | 468 |
469 "stlport", | 469 if (component_mode == "shared_library") { |
470 ] | 470 libs += [ "stlport_shared" ] |
471 } else { | 471 } else { |
472 android_stlport_root = "$android_ndk_root/sources/cxx-stl/stlport" | 472 libs += [ "stlport_static" ] |
473 | |
474 cflags += [ | |
475 "-isystem" + rebase_path("$android_stlport_root/stlport", | |
476 root_build_dir) | |
477 ] | |
478 lib_dirs += [ "$android_stlport_root/libs/$android_app_abi" ] | |
479 | |
480 if (component_mode == "shared_library") { | |
481 libs += [ "stlport_shared" ] | |
482 } else { | |
483 libs += [ "stlport_static" ] | |
484 } | |
485 } | 473 } |
486 | 474 |
487 if (cpu_arch == "mipsel") { | 475 if (cpu_arch == "mipsel") { |
488 libs += [ | 476 libs += [ |
489 # ld linker is used for mips Android, and ld does not accept library | 477 # ld linker is used for mips Android, and ld does not accept library |
490 # absolute path prefixed by "-l"; Since libgcc does not exist in mips | 478 # absolute path prefixed by "-l"; Since libgcc does not exist in mips |
491 # sysroot the proper library will be linked. | 479 # sysroot the proper library will be linked. |
492 # TODO(gordanac): Remove once gold linker is used for mips Android. | 480 # TODO(gordanac): Remove once gold linker is used for mips Android. |
493 "gcc", | 481 "gcc", |
494 ] | 482 ] |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 cflags += [ "-gsplit-dwarf" ] | 931 cflags += [ "-gsplit-dwarf" ] |
944 } | 932 } |
945 } | 933 } |
946 } | 934 } |
947 | 935 |
948 config("no_symbols") { | 936 config("no_symbols") { |
949 if (!is_win) { | 937 if (!is_win) { |
950 cflags = [ "-g0" ] | 938 cflags = [ "-g0" ] |
951 } | 939 } |
952 } | 940 } |
OLD | NEW |