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 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
365 | 365 |
366 # Clang-specific compiler flags setup. | 366 # Clang-specific compiler flags setup. |
367 # ------------------------------------ | 367 # ------------------------------------ |
368 if (is_clang) { | 368 if (is_clang) { |
369 cflags += [ "-fcolor-diagnostics" ] | 369 cflags += [ "-fcolor-diagnostics" ] |
370 } | 370 } |
371 | 371 |
372 # Print absolute paths in diagnostics. There is no precedent for doing this | 372 # Print absolute paths in diagnostics. There is no precedent for doing this |
373 # on Linux/Mac (GCC doesn't support it), but MSVC does this with /FC and | 373 # on Linux/Mac (GCC doesn't support it), but MSVC does this with /FC and |
374 # Windows developers rely on it (crbug.com/636109) so only do this on Windows. | 374 # Windows developers rely on it (crbug.com/636109) so only do this on Windows. |
375 # TODO(hans) Remove llvm_force_head_revision check in next clang roll. | 375 if (is_clang && is_win) { |
hans
2016/08/30 20:58:22
thanks!
| |
376 if (is_clang && is_win && llvm_force_head_revision) { | |
377 cflags += [ "-fdiagnostics-absolute-paths" ] | 376 cflags += [ "-fdiagnostics-absolute-paths" ] |
378 } | 377 } |
379 | 378 |
380 # Makes builds independent of absolute file path. | 379 # Makes builds independent of absolute file path. |
381 # clang-cl (used if is_win) doesn't expose this flag. | 380 # clang-cl (used if is_win) doesn't expose this flag. |
382 # Currently disabled for nacl since its toolchain lacks this flag (too old). | 381 # Currently disabled for nacl since its toolchain lacks this flag (too old). |
383 # TODO(zforman): Once nacl's toolchain is updated, remove check. | 382 # TODO(zforman): Once nacl's toolchain is updated, remove check. |
384 if (is_clang && is_linux) { | 383 if (is_clang && is_linux) { |
385 absolute_path = rebase_path("//.") | 384 absolute_path = rebase_path("//.") |
386 cflags += [ "-fdebug-prefix-map=$absolute_path=." ] | 385 cflags += [ "-fdebug-prefix-map=$absolute_path=." ] |
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1587 | 1586 |
1588 if (is_ios || is_mac) { | 1587 if (is_ios || is_mac) { |
1589 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1588 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1590 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1589 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1591 config("enable_arc") { | 1590 config("enable_arc") { |
1592 common_flags = [ "-fobjc-arc" ] | 1591 common_flags = [ "-fobjc-arc" ] |
1593 cflags_objc = common_flags | 1592 cflags_objc = common_flags |
1594 cflags_objcc = common_flags | 1593 cflags_objcc = common_flags |
1595 } | 1594 } |
1596 } | 1595 } |
OLD | NEW |