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/cc_wrapper.gni") | 9 import("//build/toolchain/cc_wrapper.gni") |
10 import("//build/toolchain/toolchain.gni") | 10 import("//build/toolchain/toolchain.gni") |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 # Clang-specific compiler flags setup. | 348 # Clang-specific compiler flags setup. |
349 # ------------------------------------ | 349 # ------------------------------------ |
350 if (is_clang) { | 350 if (is_clang) { |
351 cflags += [ "-fcolor-diagnostics" ] | 351 cflags += [ "-fcolor-diagnostics" ] |
352 } | 352 } |
353 | 353 |
354 # Makes builds independent of absolute file path. | 354 # Makes builds independent of absolute file path. |
355 # clang-cl (used if is_win) doesn't expose this flag. | 355 # clang-cl (used if is_win) doesn't expose this flag. |
356 # Currently disabled for nacl since its toolchain lacks this flag (too old). | 356 # Currently disabled for nacl since its toolchain lacks this flag (too old). |
357 # TODO(zforman): Once nacl's toolchain is updated, remove check. | 357 # TODO(zforman): Once nacl's toolchain is updated, remove check. |
358 if (is_clang && !is_win && !is_nacl) { | 358 if (is_clang && is_linux) { |
359 absolute_path = rebase_path("//.") | 359 absolute_path = rebase_path("//.") |
360 cflags += [ "-fdebug-prefix-map=$absolute_path=." ] | 360 cflags += [ "-fdebug-prefix-map=$absolute_path=." ] |
361 } | 361 } |
362 | 362 |
363 # C++11 compiler flags setup. | 363 # C++11 compiler flags setup. |
364 # --------------------------- | 364 # --------------------------- |
365 if (is_linux || is_android || (is_nacl && is_clang)) { | 365 if (is_linux || is_android || (is_nacl && is_clang)) { |
366 # gnu++11 instead of c++11 is needed because some code uses typeof() (a | 366 # gnu++11 instead of c++11 is needed because some code uses typeof() (a |
367 # GNU extension). | 367 # GNU extension). |
368 # TODO(thakis): Eventually switch this to c++11 instead, | 368 # TODO(thakis): Eventually switch this to c++11 instead, |
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1456 | 1456 |
1457 if (is_ios || is_mac) { | 1457 if (is_ios || is_mac) { |
1458 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1458 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1459 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1459 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1460 config("enable_arc") { | 1460 config("enable_arc") { |
1461 common_flags = [ "-fobjc-arc" ] | 1461 common_flags = [ "-fobjc-arc" ] |
1462 cflags_objc = common_flags | 1462 cflags_objc = common_flags |
1463 cflags_objcc = common_flags | 1463 cflags_objcc = common_flags |
1464 } | 1464 } |
1465 } | 1465 } |
OLD | NEW |