 Chromium Code Reviews
 Chromium Code Reviews Issue 2202873002:
  Rework approach to allowing extra flags for CrOS builds.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@add_cros_nacl_bootstrap_args
    
  
    Issue 2202873002:
  Rework approach to allowing extra flags for CrOS builds.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@add_cros_nacl_bootstrap_args| 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 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1570 | 1570 | 
| 1571 if (is_ios || is_mac) { | 1571 if (is_ios || is_mac) { | 
| 1572 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1572 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 
| 1573 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1573 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 
| 1574 config("enable_arc") { | 1574 config("enable_arc") { | 
| 1575 common_flags = [ "-fobjc-arc" ] | 1575 common_flags = [ "-fobjc-arc" ] | 
| 1576 cflags_objc = common_flags | 1576 cflags_objc = common_flags | 
| 1577 cflags_objcc = common_flags | 1577 cflags_objcc = common_flags | 
| 1578 } | 1578 } | 
| 1579 } | 1579 } | 
| 1580 | |
| 1581 # | |
| 1582 # Extra flags | |
| 1583 # | |
| 1584 # This is a placeholder config so that users with custom toolchains | |
| 1585 # can more easily set extra flags to be passed to each target, while | |
| 1586 # still allowing for those flags to be turned off on a per-target basis. | |
| 1587 # We generally do not want people to specify extra flags, so for now | |
| 1588 # this hook is only exposed to the CrOS build. | |
| 1589 | |
| 1590 config("extra_flags") { | |
| 1591 if (default_toolchain == "//build/config/cros:target") { | |
| 1592 configs = [ "//build/toolchain/cros:extra_flags" ] | |
| 1593 } | |
| 
Dirk Pranke
2016/08/02 00:28:10
Perhaps instead of hardcoding the toolchain and co
 
brettw
2016/08/03 23:02:14
Can this just be:
  if (target_os == "chromeos") ?
 
Dirk Pranke
2016/08/03 23:09:07
No, because that would break the "desktop chromeos
 
brettw
2016/08/08 22:10:56
Ah, then can you add an explicit comment explainin
 | |
| 1594 } | |
| OLD | NEW |