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

Side by Side Diff: build/toolchain/win/BUILD.gn

Issue 123463005: GN Command line -D parsing, goma on Windows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Don't use optparse Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « build/gyp_chromium ('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 (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/toolchain/goma.gni")
6
5 # Should only be running on Windows. 7 # Should only be running on Windows.
6 assert(is_win) 8 assert(is_win)
7 9
8 # Setup the Visual Studio state. 10 # Setup the Visual Studio state.
9 # 11 #
10 # Its argument is the location to write the environment files. 12 # Its argument is the location to write the environment files.
11 # It will write "environment.x86" and "environment.x64" to this directory, 13 # It will write "environment.x86" and "environment.x64" to this directory,
12 # and return a list to us. 14 # and return a list to us.
13 # 15 #
14 # The list contains the include path as its only element. (I'm expecting to 16 # The list contains the include path as its only element. (I'm expecting to
15 # add more so it's currently a list inside a list.) 17 # add more so it's currently a list inside a list.)
16 #exec_script("get_msvc_config.py", 18 #exec_script("get_msvc_config.py",
17 # [relative_root_output_dir], 19 # [relative_root_output_dir],
18 # "value") 20 # "value")
19 21
20 # This will save the environment block and and copy the gyp-win-tool to the 22 # This will save the environment block and and copy the gyp-win-tool to the
21 # build directory. We pass in the source file of the win tool. 23 # build directory. We pass in the source file of the win tool.
22 gyp_win_tool_source = 24 gyp_win_tool_source =
23 rebase_path("//tools/gyp/pylib/gyp/win_tool.py", ".", root_build_dir) 25 rebase_path("//tools/gyp/pylib/gyp/win_tool.py", ".", root_build_dir)
24 exec_script("setup_toolchain.py", [ gyp_win_tool_source ], "value") 26 exec_script("setup_toolchain.py", [ gyp_win_tool_source ], "value")
25 27
26 stamp_command = "$python_path gyp-win-tool stamp \$out" 28 stamp_command = "$python_path gyp-win-tool stamp \$out"
27 copy_command = "$python_path gyp-win-tool recursive-mirror \$in \$out" 29 copy_command = "$python_path gyp-win-tool recursive-mirror \$in \$out"
28 30
31 if (use_goma) {
32 # Add the Goma compiler prefixes to the GYP file.
33 gyp_header = make_goma_global_settings
34 }
35
29 # 32-bit toolchain ------------------------------------------------------------- 36 # 32-bit toolchain -------------------------------------------------------------
30 37
31 toolchain("32") { 38 toolchain("32") {
32 # Make these apply to all tools below. 39 # Make these apply to all tools below.
33 lib_prefix = "" 40 lib_prefix = ""
34 lib_dir_prefix="/LIBPATH:" 41 lib_dir_prefix="/LIBPATH:"
35 42
36 cc_command = "ninja -t msvc -e environment.x86 -- cl.exe /nologo /showIncludes /FC @\$out.rsp /c \$in /Fo\$out /Fd\$pdbname" 43 cc_command = "ninja -t msvc -e environment.x86 -- cl.exe /nologo /showIncludes /FC @\$out.rsp /c \$in /Fo\$out /Fd\$pdbname"
37 tool("cc") { 44 tool("cc") {
38 command = cc_command 45 command = cc_command
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 152
146 # When invoking this toolchain not as the default one, these args will be 153 # When invoking this toolchain not as the default one, these args will be
147 # passed to the build. They are ignored when this is the default toolchain. 154 # passed to the build. They are ignored when this is the default toolchain.
148 toolchain_args() { 155 toolchain_args() {
149 cpu_arch = "x64" 156 cpu_arch = "x64"
150 # Normally the build config resets the CPU architecture to 32-bits. Setting 157 # Normally the build config resets the CPU architecture to 32-bits. Setting
151 # this flag overrides that behavior. 158 # this flag overrides that behavior.
152 force_win64 = true 159 force_win64 = true
153 } 160 }
154 } 161 }
OLDNEW
« no previous file with comments | « build/gyp_chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698