Chromium Code Reviews| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 303 if (linux_use_bundled_binutils) { | 303 if (linux_use_bundled_binutils) { |
| 304 cflags += [ "-B$binutils_path" ] | 304 cflags += [ "-B$binutils_path" ] |
| 305 } | 305 } |
| 306 | 306 |
| 307 # Clang-specific compiler flags setup. | 307 # Clang-specific compiler flags setup. |
| 308 # ------------------------------------ | 308 # ------------------------------------ |
| 309 if (is_clang) { | 309 if (is_clang) { |
| 310 cflags += [ "-fcolor-diagnostics" ] | 310 cflags += [ "-fcolor-diagnostics" ] |
| 311 } | 311 } |
| 312 | 312 |
| 313 # Makes builds independent of absolute file path. | |
| 314 # Currently disabled for nacl since its toolchain is old and doesn't have this flag. | |
| 315 # TODO(zforman): Once nacl's toolchain is updated, remove check. | |
| 316 if (is_clang && !is_nacl) { | |
| 317 absolute_path = rebase_path("../../..") | |
|
Zachary Forman
2016/01/05 03:21:29
Is there a GN builtin or otherwise that allows us
Nico
2016/01/05 12:22:48
^ brettw
brettw
2016/01/05 19:10:11
I think you can do:
rebase_path("//.")
The thing
Zachary Forman
2016/01/06 23:20:49
This worked - thanks!
| |
| 318 cflags += [ "-fdebug-prefix-map=$absolute_path=." ] | |
| 319 } | |
| 320 | |
| 313 # C++11 compiler flags setup. | 321 # C++11 compiler flags setup. |
| 314 # --------------------------- | 322 # --------------------------- |
| 315 if (is_linux || is_android || (is_nacl && is_clang)) { | 323 if (is_linux || is_android || (is_nacl && is_clang)) { |
| 316 # gnu++11 instead of c++11 is needed because some code uses typeof() (a | 324 # gnu++11 instead of c++11 is needed because some code uses typeof() (a |
| 317 # GNU extension). | 325 # GNU extension). |
| 318 # TODO(thakis): Eventually switch this to c++11 instead, | 326 # TODO(thakis): Eventually switch this to c++11 instead, |
| 319 # http://crbug.com/427584 | 327 # http://crbug.com/427584 |
| 320 cflags_cc += [ "-std=gnu++11" ] | 328 cflags_cc += [ "-std=gnu++11" ] |
| 321 } else if (!is_win && !is_nacl) { | 329 } else if (!is_win && !is_nacl) { |
| 322 # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either gnu++11 | 330 # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either gnu++11 |
| (...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1307 if (symbol_level == 0) { | 1315 if (symbol_level == 0) { |
| 1308 configs = [ ":no_symbols" ] | 1316 configs = [ ":no_symbols" ] |
| 1309 } else if (symbol_level == 1) { | 1317 } else if (symbol_level == 1) { |
| 1310 configs = [ ":minimal_symbols" ] | 1318 configs = [ ":minimal_symbols" ] |
| 1311 } else if (symbol_level == 2) { | 1319 } else if (symbol_level == 2) { |
| 1312 configs = [ ":symbols" ] | 1320 configs = [ ":symbols" ] |
| 1313 } else { | 1321 } else { |
| 1314 assert(false) | 1322 assert(false) |
| 1315 } | 1323 } |
| 1316 } | 1324 } |
| OLD | NEW |