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

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

Issue 2079283002: [iOS/GN] Allow compilation with system clang. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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/toolchain/mac/BUILD.gn ('k') | no next file » | 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 = false 23 use_lld = false
24 24
25 if (is_clang) { 25 if (is_clang) {
26 # Clang compiler version. Clang files are placed at version-dependent paths. 26 # Clang compiler version. Clang files are placed at version-dependent paths.
27 clang_version = "3.9.0" 27 clang_version = "3.9.0"
28 } 28 }
29
30 # Compile with Xcode version of clang instead of hermetic version shipped
31 # with the build. Used on iOS to ship official builds (as they are built
32 # with the version of clang shipped with Xcode).
33 use_xcode_clang = is_ios && is_official_build
29 } 34 }
30 35
31 # Subdirectory within root_out_dir for shared library files. 36 # Subdirectory within root_out_dir for shared library files.
32 # TODO(agrieve): GYP sets this to "lib" for Linux & Android, but this won't work 37 # TODO(agrieve): GYP sets this to "lib" for Linux & Android, but this won't work
33 # in GN until support for loadable_module() is added. 38 # in GN until support for loadable_module() is added.
34 # See: https://codereview.chromium.org/1236503002/ 39 # See: https://codereview.chromium.org/1236503002/
35 shlib_subdir = "." 40 shlib_subdir = "."
36 41
37 # Root out dir for shared library files. 42 # Root out dir for shared library files.
38 root_shlib_dir = root_out_dir 43 root_shlib_dir = root_out_dir
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 stamp_description = "STAMP {{output}}" 76 stamp_description = "STAMP {{output}}"
72 copy_description = "COPY {{source}} {{output}}" 77 copy_description = "COPY {{source}} {{output}}"
73 if (host_os == "win") { 78 if (host_os == "win") {
74 stamp_command = "$python_path gyp-win-tool stamp {{output}}" 79 stamp_command = "$python_path gyp-win-tool stamp {{output}}"
75 copy_command = 80 copy_command =
76 "$python_path gyp-win-tool recursive-mirror {{source}} {{output}}" 81 "$python_path gyp-win-tool recursive-mirror {{source}} {{output}}"
77 } else { 82 } else {
78 stamp_command = "touch {{output}}" 83 stamp_command = "touch {{output}}"
79 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})" 84 copy_command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})"
80 } 85 }
OLDNEW
« no previous file with comments | « build/toolchain/mac/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698