OLD | NEW |
1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. 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 copy | 5 import copy |
6 import ntpath | 6 import ntpath |
7 import os | 7 import os |
8 import posixpath | 8 import posixpath |
9 import re | 9 import re |
10 import subprocess | 10 import subprocess |
(...skipping 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1150 msbuild_tool = '' | 1150 msbuild_tool = '' |
1151 output_file_map = { | 1151 output_file_map = { |
1152 'executable': ('VCLinkerTool', 'Link', '$(OutDir)', '.exe'), | 1152 'executable': ('VCLinkerTool', 'Link', '$(OutDir)', '.exe'), |
1153 'shared_library': ('VCLinkerTool', 'Link', '$(OutDir)', '.dll'), | 1153 'shared_library': ('VCLinkerTool', 'Link', '$(OutDir)', '.dll'), |
1154 'loadable_module': ('VCLinkerTool', 'Link', '$(OutDir)', '.dll'), | 1154 'loadable_module': ('VCLinkerTool', 'Link', '$(OutDir)', '.dll'), |
1155 'static_library': ('VCLibrarianTool', 'Lib', '$(OutDir)lib\\', '.lib'), | 1155 'static_library': ('VCLibrarianTool', 'Lib', '$(OutDir)lib\\', '.lib'), |
1156 } | 1156 } |
1157 output_file_props = output_file_map.get(spec['type']) | 1157 output_file_props = output_file_map.get(spec['type']) |
1158 if output_file_props and int(spec.get('msvs_auto_output_file', 1)): | 1158 if output_file_props and int(spec.get('msvs_auto_output_file', 1)): |
1159 vc_tool, msbuild_tool, out_dir, suffix = output_file_props | 1159 vc_tool, msbuild_tool, out_dir, suffix = output_file_props |
| 1160 if spec.get('standalone_static_library', 0): |
| 1161 out_dir = '$(OutDir)' |
1160 out_dir = spec.get('product_dir', out_dir) | 1162 out_dir = spec.get('product_dir', out_dir) |
1161 product_extension = spec.get('product_extension') | 1163 product_extension = spec.get('product_extension') |
1162 if product_extension: | 1164 if product_extension: |
1163 suffix = '.' + product_extension | 1165 suffix = '.' + product_extension |
1164 elif msbuild: | 1166 elif msbuild: |
1165 suffix = '$(TargetExt)' | 1167 suffix = '$(TargetExt)' |
1166 prefix = spec.get('product_prefix', '') | 1168 prefix = spec.get('product_prefix', '') |
1167 product_name = spec.get('product_name', '$(ProjectName)') | 1169 product_name = spec.get('product_name', '$(ProjectName)') |
1168 out_file = ntpath.join(out_dir, prefix + product_name + suffix) | 1170 out_file = ntpath.join(out_dir, prefix + product_name + suffix) |
1169 return out_file, vc_tool, msbuild_tool | 1171 return out_file, vc_tool, msbuild_tool |
(...skipping 1988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3158 action_spec.extend( | 3160 action_spec.extend( |
3159 # TODO(jeanluc) 'Document' for all or just if as_sources? | 3161 # TODO(jeanluc) 'Document' for all or just if as_sources? |
3160 [['FileType', 'Document'], | 3162 [['FileType', 'Document'], |
3161 ['Command', command], | 3163 ['Command', command], |
3162 ['Message', description], | 3164 ['Message', description], |
3163 ['Outputs', outputs] | 3165 ['Outputs', outputs] |
3164 ]) | 3166 ]) |
3165 if additional_inputs: | 3167 if additional_inputs: |
3166 action_spec.append(['AdditionalInputs', additional_inputs]) | 3168 action_spec.append(['AdditionalInputs', additional_inputs]) |
3167 actions_spec.append(action_spec) | 3169 actions_spec.append(action_spec) |
OLD | NEW |