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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
354 # Clang-specific compiler flags setup. | 354 # Clang-specific compiler flags setup. |
355 # ------------------------------------ | 355 # ------------------------------------ |
356 if (is_clang) { | 356 if (is_clang) { |
357 cflags += [ "-fcolor-diagnostics" ] | 357 cflags += [ "-fcolor-diagnostics" ] |
358 } | 358 } |
359 | 359 |
360 # Makes builds independent of absolute file path. | 360 # Makes builds independent of absolute file path. |
361 # clang-cl (used if is_win) doesn't expose this flag. | 361 # clang-cl (used if is_win) doesn't expose this flag. |
362 # Currently disabled for nacl since its toolchain lacks this flag (too old). | 362 # Currently disabled for nacl since its toolchain lacks this flag (too old). |
363 # TODO(zforman): Once nacl's toolchain is updated, remove check. | 363 # TODO(zforman): Once nacl's toolchain is updated, remove check. |
364 if (is_clang && !is_win && !is_nacl) { | 364 if (is_clang && !is_win && !is_nacl && !is_ios && !is_mac) { |
365 absolute_path = rebase_path("//.") | 365 absolute_path = rebase_path("//.") |
366 cflags += [ "-fdebug-prefix-map=$absolute_path=." ] | 366 cflags += [ "-fdebug-prefix-map=$absolute_path=." ] |
sdefresne
2016/04/27 17:41:53
This flag cause Xcode to be unable to map object c
| |
367 } | 367 } |
368 | 368 |
369 # C++11 compiler flags setup. | 369 # C++11 compiler flags setup. |
370 # --------------------------- | 370 # --------------------------- |
371 if (is_linux || is_android || (is_nacl && is_clang)) { | 371 if (is_linux || is_android || (is_nacl && is_clang)) { |
372 # gnu++11 instead of c++11 is needed because some code uses typeof() (a | 372 # gnu++11 instead of c++11 is needed because some code uses typeof() (a |
373 # GNU extension). | 373 # GNU extension). |
374 # TODO(thakis): Eventually switch this to c++11 instead, | 374 # TODO(thakis): Eventually switch this to c++11 instead, |
375 # http://crbug.com/427584 | 375 # http://crbug.com/427584 |
376 cflags_cc += [ "-std=gnu++11" ] | 376 cflags_cc += [ "-std=gnu++11" ] |
(...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1435 | 1435 |
1436 if (is_ios || is_mac) { | 1436 if (is_ios || is_mac) { |
1437 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1437 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1438 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1438 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1439 config("enable_arc") { | 1439 config("enable_arc") { |
1440 common_flags = [ "-fobjc-arc" ] | 1440 common_flags = [ "-fobjc-arc" ] |
1441 cflags_objc = common_flags | 1441 cflags_objc = common_flags |
1442 cflags_objcc = common_flags | 1442 cflags_objcc = common_flags |
1443 } | 1443 } |
1444 } | 1444 } |
OLD | NEW |