| 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 (cpu_arch == "mipsel" || cpu_arch == "mips64el") { | 9 if (cpu_arch == "mipsel" || cpu_arch == "mips64el") { |
| 10 import("//build/config/mips.gni") | 10 import("//build/config/mips.gni") |
| (...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 if (is_clang) { | 536 if (is_clang) { |
| 537 # Work around incompatibilities between bionic and clang headers. | 537 # Work around incompatibilities between bionic and clang headers. |
| 538 defines += [ | 538 defines += [ |
| 539 "__compiler_offsetof=__builtin_offsetof", | 539 "__compiler_offsetof=__builtin_offsetof", |
| 540 "nan=__builtin_nan", | 540 "nan=__builtin_nan", |
| 541 ] | 541 ] |
| 542 } | 542 } |
| 543 | 543 |
| 544 defines += [ "__GNU_SOURCE=1" ] # Necessary for clone(). | 544 defines += [ "__GNU_SOURCE=1" ] # Necessary for clone(). |
| 545 | 545 |
| 546 ldflags += [ | 546 # TODO(jdduke) Re-enable on mips after resolving linking |
| 547 "-Wl,--warn-shared-textrel", | 547 # issues with libc++ (crbug.com/456380). |
| 548 "-nostdlib", | 548 if (cpu_arch != "mipsel" && cpu_arch != "mips64el") { |
| 549 ] | 549 ldflags += [ "-Wl,--warn-shared-textrel" ] |
| 550 } |
| 551 ldflags += [ "-nostdlib" ] |
| 550 | 552 |
| 551 android_libcpp_root = "$android_ndk_root/sources/cxx-stl/llvm-libc++" | 553 android_libcpp_root = "$android_ndk_root/sources/cxx-stl/llvm-libc++" |
| 552 | 554 |
| 553 cflags += [ | 555 cflags += [ |
| 554 "-isystem" + | 556 "-isystem" + |
| 555 rebase_path("$android_libcpp_root/libcxx/include", root_build_dir), | 557 rebase_path("$android_libcpp_root/libcxx/include", root_build_dir), |
| 556 "-isystem" + rebase_path( | 558 "-isystem" + rebase_path( |
| 557 "$android_ndk_root/sources/cxx-stl/llvm-libc++abi/libcxxabi/includ
e", | 559 "$android_ndk_root/sources/cxx-stl/llvm-libc++abi/libcxxabi/includ
e", |
| 558 root_build_dir), | 560 root_build_dir), |
| 559 "-isystem" + | 561 "-isystem" + |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 910 # can be removed at link time with --gc-sections. | 912 # can be removed at link time with --gc-sections. |
| 911 "-fdata-sections", | 913 "-fdata-sections", |
| 912 "-ffunction-sections", | 914 "-ffunction-sections", |
| 913 ] | 915 ] |
| 914 common_optimize_on_ldflags = [] | 916 common_optimize_on_ldflags = [] |
| 915 | 917 |
| 916 if (is_android) { | 918 if (is_android) { |
| 917 if (!using_sanitizer) { | 919 if (!using_sanitizer) { |
| 918 common_optimize_on_cflags += [ "-fomit-frame-pointer" ] | 920 common_optimize_on_cflags += [ "-fomit-frame-pointer" ] |
| 919 } | 921 } |
| 920 common_optimize_on_ldflags += [ | 922 |
| 921 # Warn in case of text relocations. | 923 # TODO(jdduke) Re-enable on mips after resolving linking |
| 922 "-Wl,--warn-shared-textrel", | 924 # issues with libc++ (crbug.com/456380). |
| 923 ] | 925 if (cpu_arch != "mipsel" && cpu_arch != "mips64el") { |
| 926 common_optimize_on_ldflags += [ |
| 927 # Warn in case of text relocations. |
| 928 "-Wl,--warn-shared-textrel", |
| 929 ] |
| 930 } |
| 924 } | 931 } |
| 925 | 932 |
| 926 if (is_mac) { | 933 if (is_mac) { |
| 927 if (symbol_level == 2) { | 934 if (symbol_level == 2) { |
| 928 # Mac dead code stripping requires symbols. | 935 # Mac dead code stripping requires symbols. |
| 929 common_optimize_on_ldflags += [ "-Wl,-dead_strip" ] | 936 common_optimize_on_ldflags += [ "-Wl,-dead_strip" ] |
| 930 } | 937 } |
| 931 } else { | 938 } else { |
| 932 # Non-Mac Posix linker flags. | 939 # Non-Mac Posix linker flags. |
| 933 common_optimize_on_ldflags += [ | 940 common_optimize_on_ldflags += [ |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1042 cflags += [ "-gsplit-dwarf" ] | 1049 cflags += [ "-gsplit-dwarf" ] |
| 1043 } | 1050 } |
| 1044 } | 1051 } |
| 1045 } | 1052 } |
| 1046 | 1053 |
| 1047 config("no_symbols") { | 1054 config("no_symbols") { |
| 1048 if (!is_win) { | 1055 if (!is_win) { |
| 1049 cflags = [ "-g0" ] | 1056 cflags = [ "-g0" ] |
| 1050 } | 1057 } |
| 1051 } | 1058 } |
| OLD | NEW |