Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 # Toolchain-related configuration that may be needed outside the context of the | 5 # Toolchain-related configuration that may be needed outside the context of the |
| 6 # toolchain() rules themselves. | 6 # toolchain() rules themselves. |
| 7 | 7 |
| 8 import("//build_overrides/build.gni") | 8 import("//build_overrides/build.gni") |
| 9 import("//build/config/chrome_build.gni") | 9 import("//build/config/chrome_build.gni") |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 28 # the CLANG_REVISION to use, instead of the version hard-coded into | 28 # the CLANG_REVISION to use, instead of the version hard-coded into |
| 29 # //tools/clang/scripts/update.py. This should only be used in | 29 # //tools/clang/scripts/update.py. This should only be used in |
| 30 # conjunction with setting LLVM_FORCE_HEAD_REVISION in the | 30 # conjunction with setting LLVM_FORCE_HEAD_REVISION in the |
| 31 # environment when `gclient runhooks` is run as well. | 31 # environment when `gclient runhooks` is run as well. |
| 32 llvm_force_head_revision = false | 32 llvm_force_head_revision = false |
| 33 | 33 |
| 34 # Compile with Xcode version of clang instead of hermetic version shipped | 34 # Compile with Xcode version of clang instead of hermetic version shipped |
| 35 # with the build. Used on iOS to ship official builds (as they are built | 35 # with the build. Used on iOS to ship official builds (as they are built |
| 36 # with the version of clang shipped with Xcode). | 36 # with the version of clang shipped with Xcode). |
| 37 use_xcode_clang = is_ios && is_official_build | 37 use_xcode_clang = is_ios && is_official_build |
| 38 | |
| 39 # Used for binary size analysis. | |
| 40 generate_linker_map = is_android && is_official_build | |
| 41 } | |
| 42 | |
| 43 if (generate_linker_map) { | |
| 44 assert(is_official_build, | |
| 45 "Linker map files can only be generated when is_official_build = true") | |
|
agrieve
2017/05/17 14:33:11
nit: can -> should
estevenson
2017/05/17 23:02:08
Done.
| |
| 46 assert(target_os == "android" || target_os == "linux", | |
| 47 "Linker map files can only be generated for Android and Linux") | |
| 38 } | 48 } |
| 39 | 49 |
| 40 # The path to the hermetic install of Xcode. Only relevant when | 50 # The path to the hermetic install of Xcode. Only relevant when |
| 41 # use_system_xcode = false. | 51 # use_system_xcode = false. |
| 42 hermetic_xcode_path = | 52 hermetic_xcode_path = |
| 43 rebase_path("//build/${target_os}_files/Xcode.app", "", root_build_dir) | 53 rebase_path("//build/${target_os}_files/Xcode.app", "", root_build_dir) |
| 44 | 54 |
| 45 declare_args() { | 55 declare_args() { |
| 46 if (is_clang) { | 56 if (is_clang) { |
| 47 # Clang compiler version. Clang files are placed at version-dependent paths. | 57 # Clang compiler version. Clang files are placed at version-dependent paths. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 107 _tool_wrapper_path = | 117 _tool_wrapper_path = |
| 108 rebase_path("//build/toolchain/win/tool_wrapper.py", root_build_dir) | 118 rebase_path("//build/toolchain/win/tool_wrapper.py", root_build_dir) |
| 109 | 119 |
| 110 stamp_command = "$python_path $_tool_wrapper_path stamp {{output}}" | 120 stamp_command = "$python_path $_tool_wrapper_path stamp {{output}}" |
| 111 copy_command = | 121 copy_command = |
| 112 "$python_path $_tool_wrapper_path recursive-mirror {{source}} {{output}}" | 122 "$python_path $_tool_wrapper_path recursive-mirror {{source}} {{output}}" |
| 113 } else { | 123 } else { |
| 114 stamp_command = "touch {{output}}" | 124 stamp_command = "touch {{output}}" |
| 115 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})" | 125 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})" |
| 116 } | 126 } |
| OLD | NEW |