| 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 import("//build/config/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
| 7 import("//build/config/compiler/compiler.gni") | 7 import("//build/config/compiler/compiler.gni") |
| 8 import("//build/toolchain/ccache.gni") | 8 import("//build/toolchain/ccache.gni") |
| 9 | 9 |
| 10 if (current_cpu == "arm") { | 10 if (current_cpu == "arm") { |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it. | 134 # TODO(phajdan.jr): Use -fstack-protector-strong when our gcc supports it. |
| 135 cflags += [ "--param=ssp-buffer-size=4" ] | 135 cflags += [ "--param=ssp-buffer-size=4" ] |
| 136 if (is_android && (current_cpu == "arm64" || current_cpu == "x86")) { | 136 if (is_android && (current_cpu == "arm64" || current_cpu == "x86")) { |
| 137 cflags += [ "-fno-stack-protector" ] | 137 cflags += [ "-fno-stack-protector" ] |
| 138 } else { | 138 } else { |
| 139 cflags += [ "-fstack-protector" ] | 139 cflags += [ "-fstack-protector" ] |
| 140 } | 140 } |
| 141 } | 141 } |
| 142 | 142 |
| 143 # Linker warnings. | 143 # Linker warnings. |
| 144 if (!(is_chromeos && current_cpu == "arm") && !is_mac && !is_ios) { | 144 if (!(is_chromeos && current_cpu == "arm") && |
| 145 !(is_android && use_order_profiling) && !is_mac && !is_ios) { |
| 145 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 | 146 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 |
| 147 # TODO(azarchs): Fix link errors when linking with order_profiling=1 |
| 148 # crbug.com/485542 |
| 146 ldflags += [ "-Wl,--fatal-warnings" ] | 149 ldflags += [ "-Wl,--fatal-warnings" ] |
| 147 } | 150 } |
| 148 } | 151 } |
| 149 | 152 |
| 150 if (is_clang && is_debug) { | 153 if (is_clang && is_debug) { |
| 151 # Allow comparing the address of references and 'this' against 0 | 154 # Allow comparing the address of references and 'this' against 0 |
| 152 # in debug builds. Technically, these can never be null in | 155 # in debug builds. Technically, these can never be null in |
| 153 # well-defined C/C++ and Clang can optimize such checks away in | 156 # well-defined C/C++ and Clang can optimize such checks away in |
| 154 # release builds, but they may be used in asserts in debug builds. | 157 # release builds, but they may be used in asserts in debug builds. |
| 155 cflags_cc += [ | 158 cflags_cc += [ |
| (...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1135 if (symbol_level == 0) { | 1138 if (symbol_level == 0) { |
| 1136 configs = [ ":no_symbols" ] | 1139 configs = [ ":no_symbols" ] |
| 1137 } else if (symbol_level == 1) { | 1140 } else if (symbol_level == 1) { |
| 1138 configs = [ ":minimal_symbols" ] | 1141 configs = [ ":minimal_symbols" ] |
| 1139 } else if (symbol_level == 2) { | 1142 } else if (symbol_level == 2) { |
| 1140 configs = [ ":symbols" ] | 1143 configs = [ ":symbols" ] |
| 1141 } else { | 1144 } else { |
| 1142 assert(false) | 1145 assert(false) |
| 1143 } | 1146 } |
| 1144 } | 1147 } |
| OLD | NEW |