Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: build/toolchain/toolchain.gni

Issue 2214333004: Roll clang 274369:277642. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 277642 Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | tools/clang/scripts/update.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/config/chrome_build.gni") 8 import("//build/config/chrome_build.gni")
9 9
10 declare_args() { 10 declare_args() {
11 # Enable Link Time Optimization in optimized builds (output programs run 11 # Enable Link Time Optimization in optimized builds (output programs run
12 # faster, but linking is up to 5-20x slower). 12 # faster, but linking is up to 5-20x slower).
13 # Note: use target_os == "linux" rather than is_linux so that it does not 13 # Note: use target_os == "linux" rather than is_linux so that it does not
14 # apply to host_toolchain when target_os="android". 14 # apply to host_toolchain when target_os="android".
15 allow_posix_link_time_opt = 15 allow_posix_link_time_opt =
16 target_os == "linux" && !is_chromeos && target_cpu == "x64" && 16 target_os == "linux" && !is_chromeos && target_cpu == "x64" &&
17 is_chrome_branded && is_official_build 17 is_chrome_branded && is_official_build
18 18
19 # Set to true to use lld, the LLVM linker. This flag may be used on Windows 19 # Set to true to use lld, the LLVM linker. This flag may be used on Windows
20 # with the shipped LLVM toolchain, or on Linux with a self-built top-of-tree 20 # with the shipped LLVM toolchain, or on Linux with a self-built top-of-tree
21 # LLVM toolchain (see llvm_force_head_revision in 21 # LLVM toolchain (see llvm_force_head_revision in
22 # build/config/compiler/BUILD.gn). 22 # build/config/compiler/BUILD.gn).
23 use_lld = is_win && host_os != "win" 23 use_lld = is_win && host_os != "win"
24 24
25 # If this is set to true, or if LLVM_FORCE_HEAD_REVISION is set to 1
26 # in the environment, we use the revision in the llvm repo to determine
27 # the CLANG_REVISION to use, instead of the version hard-coded into
28 # //tools/clang/scripts/update.py. This should only be used in
29 # conjunction with setting LLVM_FORCE_HEAD_REVISION in the
30 # environment when `gclient runhooks` is run as well.
31 llvm_force_head_revision = false
32
33 # Compile with Xcode version of clang instead of hermetic version shipped 25 # Compile with Xcode version of clang instead of hermetic version shipped
34 # with the build. Used on iOS to ship official builds (as they are built 26 # with the build. Used on iOS to ship official builds (as they are built
35 # with the version of clang shipped with Xcode). 27 # with the version of clang shipped with Xcode).
36 use_xcode_clang = is_ios && is_official_build 28 use_xcode_clang = is_ios && is_official_build
37 } 29 }
38 30
39 declare_args() { 31 if (is_clang) {
40 if (is_clang) { 32 # Clang compiler version. Clang files are placed at version-dependent paths.
41 # Clang compiler version. Clang files are placed at version-dependent paths. 33 clang_version = "4.0.0"
42 clang_version = "3.9.0"
43
44 if (llvm_force_head_revision) {
45 # TODO(hans): Remove after next Clang roll.
46 # ToT Clang has a higher version number.
47 clang_version = "4.0.0"
48 }
49 }
50 } 34 }
51 35
52 # Check target_os here instead of is_ios as this file is loaded for secondary 36 # Check target_os here instead of is_ios as this file is loaded for secondary
53 # toolchain (host toolchain in particular) but the argument is the same for 37 # toolchain (host toolchain in particular) but the argument is the same for
54 # all toolchains. 38 # all toolchains.
55 assert(!use_xcode_clang || target_os == "ios", 39 assert(!use_xcode_clang || target_os == "ios",
56 "Using Xcode's clang is only supported in iOS builds") 40 "Using Xcode's clang is only supported in iOS builds")
57 41
58 # Subdirectory within root_out_dir for shared library files. 42 # Subdirectory within root_out_dir for shared library files.
59 # TODO(agrieve): GYP sets this to "lib" for Linux & Android, but this won't work 43 # TODO(agrieve): GYP sets this to "lib" for Linux & Android, but this won't work
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 stamp_description = "STAMP {{output}}" 82 stamp_description = "STAMP {{output}}"
99 copy_description = "COPY {{source}} {{output}}" 83 copy_description = "COPY {{source}} {{output}}"
100 if (host_os == "win") { 84 if (host_os == "win") {
101 stamp_command = "$python_path gyp-win-tool stamp {{output}}" 85 stamp_command = "$python_path gyp-win-tool stamp {{output}}"
102 copy_command = 86 copy_command =
103 "$python_path gyp-win-tool recursive-mirror {{source}} {{output}}" 87 "$python_path gyp-win-tool recursive-mirror {{source}} {{output}}"
104 } else { 88 } else {
105 stamp_command = "touch {{output}}" 89 stamp_command = "touch {{output}}"
106 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})" 90 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})"
107 } 91 }
OLDNEW
« no previous file with comments | « build/config/compiler/BUILD.gn ('k') | tools/clang/scripts/update.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698