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/win/visual_studio_version.gni") | 5 import("//build/config/win/visual_studio_version.gni") |
6 import("//build/toolchain/goma.gni") | 6 import("//build/toolchain/goma.gni") |
7 | 7 |
8 # Should only be running on Windows. | 8 # Should only be running on Windows. |
9 assert(is_win) | 9 assert(is_win) |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 # allow targets to override this extension on Windows. | 80 # allow targets to override this extension on Windows. |
81 "{{target_out_dir}}/{{target_output_name}}.lib", | 81 "{{target_out_dir}}/{{target_output_name}}.lib", |
82 ] | 82 ] |
83 default_output_extension = ".lib" | 83 default_output_extension = ".lib" |
84 # The use of inputs_newline is to work around a fixed per-line buffer | 84 # The use of inputs_newline is to work around a fixed per-line buffer |
85 # size in the linker. | 85 # size in the linker. |
86 rspfile_content = "{{inputs_newline}}" | 86 rspfile_content = "{{inputs_newline}}" |
87 } | 87 } |
88 | 88 |
89 tool("solink") { | 89 tool("solink") { |
90 dllname = "{{target_output_name}}{{output_extension}}" # e.g. foo.dll | 90 dllname = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" #
e.g. foo.dll |
91 libname = "{{target_output_name}}{{output_extension}}.lib" # e.g. foo.dll
.lib | 91 libname = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}.lib
" # e.g. foo.dll.lib |
92 rspfile = "${dllname}.rsp" | 92 rspfile = "${dllname}.rsp" |
93 | 93 |
94 link_command = "$python_path gyp-win-tool link-wrapper $env False link.exe
/nologo /IMPLIB:$libname /DLL /OUT:$dllname /PDB:${dllname}.pdb @$rspfile" | 94 link_command = "$python_path gyp-win-tool link-wrapper $env False link.exe
/nologo /IMPLIB:$libname /DLL /OUT:$dllname /PDB:${dllname}.pdb @$rspfile" |
95 | 95 |
96 # TODO(brettw) support manifests | 96 # TODO(brettw) support manifests |
97 #manifest_command = "$python_path gyp-win-tool manifest-wrapper $env mt.ex
e -nologo -manifest $manifests -out:${dllname}.manifest" | 97 #manifest_command = "$python_path gyp-win-tool manifest-wrapper $env mt.ex
e -nologo -manifest $manifests -out:${dllname}.manifest" |
98 #command = "cmd /c $link_command && $manifest_command" | 98 #command = "cmd /c $link_command && $manifest_command" |
99 command = link_command | 99 command = link_command |
100 | 100 |
101 default_output_extension = ".dll" | 101 default_output_extension = ".dll" |
(...skipping 13 matching lines...) Expand all Loading... |
115 link_command = "$python_path gyp-win-tool link-wrapper $env False link.exe
/nologo /OUT:{{output}} /PDB:{{output}}.pdb @$rspfile" | 115 link_command = "$python_path gyp-win-tool link-wrapper $env False link.exe
/nologo /OUT:{{output}} /PDB:{{output}}.pdb @$rspfile" |
116 | 116 |
117 # TODO(brettw) support manifests | 117 # TODO(brettw) support manifests |
118 #manifest_command = "$python_path gyp-win-tool manifest-wrapper $env mt.ex
e -nologo -manifest $manifests -out:{{output}}.manifest" | 118 #manifest_command = "$python_path gyp-win-tool manifest-wrapper $env mt.ex
e -nologo -manifest $manifests -out:{{output}}.manifest" |
119 #command = "cmd /c $link_command && $manifest_command" | 119 #command = "cmd /c $link_command && $manifest_command" |
120 command = link_command | 120 command = link_command |
121 | 121 |
122 default_output_extension = ".exe" | 122 default_output_extension = ".exe" |
123 description = "LINK {{output}}" | 123 description = "LINK {{output}}" |
124 outputs = [ | 124 outputs = [ |
125 "{{target_output_name}}{{output_extension}}", | 125 "{{root_out_dir}}/{{target_output_name}}{{output_extension}}", |
126 ] | 126 ] |
127 # The use of inputs_newline is to work around a fixed per-line buffer | 127 # The use of inputs_newline is to work around a fixed per-line buffer |
128 # size in the linker. | 128 # size in the linker. |
129 rspfile_content = "{{inputs_newline}} {{libs}} {{solibs}} {{ldflags}}" | 129 rspfile_content = "{{inputs_newline}} {{libs}} {{solibs}} {{ldflags}}" |
130 } | 130 } |
131 | 131 |
132 tool("stamp") { | 132 tool("stamp") { |
133 command = "$python_path gyp-win-tool stamp {{output}}" | 133 command = "$python_path gyp-win-tool stamp {{output}}" |
134 description = "STAMP {{output}}" | 134 description = "STAMP {{output}}" |
135 } | 135 } |
(...skipping 20 matching lines...) Expand all Loading... |
156 msvc_toolchain("32") { | 156 msvc_toolchain("32") { |
157 environment = "environment.x86" | 157 environment = "environment.x86" |
158 cpu_arch = "x64" | 158 cpu_arch = "x64" |
159 } | 159 } |
160 | 160 |
161 msvc_toolchain("64") { | 161 msvc_toolchain("64") { |
162 environment = "environment.x64" | 162 environment = "environment.x64" |
163 cpu_arch = "x64" | 163 cpu_arch = "x64" |
164 force_win64 = true | 164 force_win64 = true |
165 } | 165 } |
OLD | NEW |