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/config/nacl/config.gni") | 8 import("//build/config/nacl/config.gni") |
9 import("//build/toolchain/ccache.gni") | 9 import("//build/toolchain/ccache.gni") |
10 | 10 |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 if (linux_use_bundled_binutils) { | 300 if (linux_use_bundled_binutils) { |
301 cflags += [ "-B$binutils_path" ] | 301 cflags += [ "-B$binutils_path" ] |
302 } | 302 } |
303 | 303 |
304 # Clang-specific compiler flags setup. | 304 # Clang-specific compiler flags setup. |
305 # ------------------------------------ | 305 # ------------------------------------ |
306 if (is_clang) { | 306 if (is_clang) { |
307 cflags += [ "-fcolor-diagnostics" ] | 307 cflags += [ "-fcolor-diagnostics" ] |
308 } | 308 } |
309 | 309 |
310 # Makes builds independent of absolute file path. | |
311 # clang-cl (used if is_win) doesn't expose this flag. | |
312 # Currently disabled for nacl since its toolchain lacks this flag (too old). | |
313 # TODO(zforman): Once nacl's toolchain is updated, remove check. | |
314 if (is_clang && !is_win && !is_nacl) { | |
315 absolute_path = rebase_path("//.") | |
316 cflags += [ "-fdebug-prefix-map=$absolute_path=." ] | |
317 } | |
318 | |
319 # C++11 compiler flags setup. | 310 # C++11 compiler flags setup. |
320 # --------------------------- | 311 # --------------------------- |
321 if (is_linux || is_android || (is_nacl && is_clang)) { | 312 if (is_linux || is_android || (is_nacl && is_clang)) { |
322 # gnu++11 instead of c++11 is needed because some code uses typeof() (a | 313 # gnu++11 instead of c++11 is needed because some code uses typeof() (a |
323 # GNU extension). | 314 # GNU extension). |
324 # TODO(thakis): Eventually switch this to c++11 instead, | 315 # TODO(thakis): Eventually switch this to c++11 instead, |
325 # http://crbug.com/427584 | 316 # http://crbug.com/427584 |
326 cflags_cc += [ "-std=gnu++11" ] | 317 cflags_cc += [ "-std=gnu++11" ] |
327 } else if (!is_win && !is_nacl) { | 318 } else if (!is_win && !is_nacl) { |
328 # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either gnu++11 | 319 # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either gnu++11 |
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1305 if (symbol_level == 0) { | 1296 if (symbol_level == 0) { |
1306 configs = [ ":no_symbols" ] | 1297 configs = [ ":no_symbols" ] |
1307 } else if (symbol_level == 1) { | 1298 } else if (symbol_level == 1) { |
1308 configs = [ ":minimal_symbols" ] | 1299 configs = [ ":minimal_symbols" ] |
1309 } else if (symbol_level == 2) { | 1300 } else if (symbol_level == 2) { |
1310 configs = [ ":symbols" ] | 1301 configs = [ ":symbols" ] |
1311 } else { | 1302 } else { |
1312 assert(false) | 1303 assert(false) |
1313 } | 1304 } |
1314 } | 1305 } |
OLD | NEW |