| 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/clang/clang.gni") | 5 import("//build/config/clang/clang.gni") |
| 6 import("//build/config/compiler/compiler.gni") |
| 6 import("//build/config/sanitizers/sanitizers.gni") | 7 import("//build/config/sanitizers/sanitizers.gni") |
| 7 import("//build/config/win/visual_studio_version.gni") | 8 import("//build/config/win/visual_studio_version.gni") |
| 8 import("//build/toolchain/goma.gni") | 9 import("//build/toolchain/goma.gni") |
| 9 import("//build/toolchain/toolchain.gni") | 10 import("//build/toolchain/toolchain.gni") |
| 10 import("//build/toolchain/concurrent_links.gni") | 11 import("//build/toolchain/concurrent_links.gni") |
| 11 | 12 |
| 12 # Should only be running on Windows. | 13 # Should only be running on Windows. |
| 13 assert(is_win) | 14 assert(is_win) |
| 14 | 15 |
| 15 # Setup the Visual Studio state. | 16 # Setup the Visual Studio state. |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 default_output_dir = "{{target_out_dir}}" | 173 default_output_dir = "{{target_out_dir}}" |
| 173 | 174 |
| 174 # The use of inputs_newline is to work around a fixed per-line buffer | 175 # The use of inputs_newline is to work around a fixed per-line buffer |
| 175 # size in the linker. | 176 # size in the linker. |
| 176 rspfile_content = "{{inputs_newline}}" | 177 rspfile_content = "{{inputs_newline}}" |
| 177 } | 178 } |
| 178 | 179 |
| 179 tool("solink") { | 180 tool("solink") { |
| 180 dllname = "{{output_dir}}/{{target_output_name}}{{output_extension}}" # e
.g. foo.dll | 181 dllname = "{{output_dir}}/{{target_output_name}}{{output_extension}}" # e
.g. foo.dll |
| 181 libname = "${dllname}.lib" # e.g. foo.dll.lib | 182 libname = "${dllname}.lib" # e.g. foo.dll.lib |
| 183 pdbname = "${dllname}.pdb" |
| 182 rspfile = "${dllname}.rsp" | 184 rspfile = "${dllname}.rsp" |
| 183 | 185 |
| 184 command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo
/IMPLIB:$libname /DLL /OUT:$dllname /PDB:${dllname}.pdb @$rspfile" | 186 command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo
/IMPLIB:$libname /DLL /OUT:$dllname /PDB:$pdbname @$rspfile" |
| 185 | 187 |
| 186 default_output_extension = ".dll" | 188 default_output_extension = ".dll" |
| 187 default_output_dir = "{{root_out_dir}}" | 189 default_output_dir = "{{root_out_dir}}" |
| 188 description = "LINK(DLL) {{output}}" | 190 description = "LINK(DLL) {{output}}" |
| 189 outputs = [ | 191 outputs = [ |
| 190 dllname, | 192 dllname, |
| 191 libname, | 193 libname, |
| 192 ] | 194 ] |
| 193 link_output = libname | 195 link_output = libname |
| 194 depend_output = libname | 196 depend_output = libname |
| 195 runtime_outputs = [ dllname ] | 197 runtime_outputs = [ dllname ] |
| 198 if (symbol_level != 0) { |
| 199 outputs += [ pdbname ] |
| 200 runtime_outputs += [ pdbname ] |
| 201 } |
| 196 | 202 |
| 197 # Since the above commands only updates the .lib file when it changes, ask | 203 # Since the above commands only updates the .lib file when it changes, ask |
| 198 # Ninja to check if the timestamp actually changed to know if downstream | 204 # Ninja to check if the timestamp actually changed to know if downstream |
| 199 # dependencies should be recompiled. | 205 # dependencies should be recompiled. |
| 200 restat = true | 206 restat = true |
| 201 | 207 |
| 202 # The use of inputs_newline is to work around a fixed per-line buffer | 208 # The use of inputs_newline is to work around a fixed per-line buffer |
| 203 # size in the linker. | 209 # size in the linker. |
| 204 rspfile_content = "{{libs}} {{solibs}} {{inputs_newline}} {{ldflags}}" | 210 rspfile_content = "{{libs}} {{solibs}} {{inputs_newline}} {{ldflags}}" |
| 205 } | 211 } |
| 206 | 212 |
| 207 tool("solink_module") { | 213 tool("solink_module") { |
| 208 dllname = "{{output_dir}}/{{target_output_name}}{{output_extension}}" # e
.g. foo.dll | 214 dllname = "{{output_dir}}/{{target_output_name}}{{output_extension}}" # e
.g. foo.dll |
| 215 pdbname = "${dllname}.pdb" |
| 209 rspfile = "${dllname}.rsp" | 216 rspfile = "${dllname}.rsp" |
| 210 | 217 |
| 211 command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo
/DLL /OUT:$dllname /PDB:${dllname}.pdb @$rspfile" | 218 command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo
/DLL /OUT:$dllname /PDB:$pdbname @$rspfile" |
| 212 | 219 |
| 213 default_output_extension = ".dll" | 220 default_output_extension = ".dll" |
| 214 default_output_dir = "{{root_out_dir}}" | 221 default_output_dir = "{{root_out_dir}}" |
| 215 description = "LINK_MODULE(DLL) {{output}}" | 222 description = "LINK_MODULE(DLL) {{output}}" |
| 216 outputs = [ | 223 outputs = [ |
| 217 dllname, | 224 dllname, |
| 218 ] | 225 ] |
| 226 if (symbol_level != 0) { |
| 227 outputs += [ pdbname ] |
| 228 } |
| 229 runtime_outputs = outputs |
| 219 | 230 |
| 220 # The use of inputs_newline is to work around a fixed per-line buffer | 231 # The use of inputs_newline is to work around a fixed per-line buffer |
| 221 # size in the linker. | 232 # size in the linker. |
| 222 rspfile_content = "{{libs}} {{solibs}} {{inputs_newline}} {{ldflags}}" | 233 rspfile_content = "{{libs}} {{solibs}} {{inputs_newline}} {{ldflags}}" |
| 223 } | 234 } |
| 224 | 235 |
| 225 tool("link") { | 236 tool("link") { |
| 226 rspfile = "{{output}}.rsp" | 237 exename = "{{output_dir}}/{{target_output_name}}{{output_extension}}" |
| 238 pdbname = "$exename.pdb" |
| 239 rspfile = "$exename.rsp" |
| 227 | 240 |
| 228 command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo
/OUT:{{output}} /PDB:{{output}}.pdb @$rspfile" | 241 command = "$python_path gyp-win-tool link-wrapper $env False $link /nologo
/OUT:$exename /PDB:$pdbname @$rspfile" |
| 229 | 242 |
| 230 default_output_extension = ".exe" | 243 default_output_extension = ".exe" |
| 231 default_output_dir = "{{root_out_dir}}" | 244 default_output_dir = "{{root_out_dir}}" |
| 232 description = "LINK {{output}}" | 245 description = "LINK {{output}}" |
| 233 outputs = [ | 246 outputs = [ |
| 234 "{{output_dir}}/{{target_output_name}}{{output_extension}}", | 247 exename, |
| 235 ] | 248 ] |
| 249 if (symbol_level != 0) { |
| 250 outputs += [ pdbname ] |
| 251 } |
| 252 runtime_outputs = outputs |
| 236 | 253 |
| 237 # The use of inputs_newline is to work around a fixed per-line buffer | 254 # The use of inputs_newline is to work around a fixed per-line buffer |
| 238 # size in the linker. | 255 # size in the linker. |
| 239 rspfile_content = "{{inputs_newline}} {{libs}} {{solibs}} {{ldflags}}" | 256 rspfile_content = "{{inputs_newline}} {{libs}} {{solibs}} {{ldflags}}" |
| 240 } | 257 } |
| 241 | 258 |
| 242 # These two are really entirely generic, but have to be repeated in | 259 # These two are really entirely generic, but have to be repeated in |
| 243 # each toolchain because GN doesn't allow a template to be used here. | 260 # each toolchain because GN doesn't allow a template to be used here. |
| 244 # See //build/toolchain/toolchain.gni for details. | 261 # See //build/toolchain/toolchain.gni for details. |
| 245 tool("stamp") { | 262 tool("stamp") { |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 | 430 |
| 414 msvc_toolchain("winrt_x64") { | 431 msvc_toolchain("winrt_x64") { |
| 415 environment = "environment.winrt_x64" | 432 environment = "environment.winrt_x64" |
| 416 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" | 433 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" |
| 417 is_clang = false | 434 is_clang = false |
| 418 | 435 |
| 419 toolchain_cpu = "x64" | 436 toolchain_cpu = "x64" |
| 420 toolchain_os = current_os | 437 toolchain_os = current_os |
| 421 } | 438 } |
| 422 } | 439 } |
| OLD | NEW |