| 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 1106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1117 """ | 1117 """ |
| 1118 libraries = spec.get('libraries', []) | 1118 libraries = spec.get('libraries', []) |
| 1119 # Strip out -l, as it is not used on windows (but is needed so we can pass | 1119 # Strip out -l, as it is not used on windows (but is needed so we can pass |
| 1120 # in libraries that are assumed to be in the default library path). | 1120 # in libraries that are assumed to be in the default library path). |
| 1121 # Also remove duplicate entries, leaving only the last duplicate, while | 1121 # Also remove duplicate entries, leaving only the last duplicate, while |
| 1122 # preserving order. | 1122 # preserving order. |
| 1123 found = set() | 1123 found = set() |
| 1124 unique_libraries_list = [] | 1124 unique_libraries_list = [] |
| 1125 for entry in reversed(libraries): | 1125 for entry in reversed(libraries): |
| 1126 library = re.sub('^\-l', '', entry) | 1126 library = re.sub('^\-l', '', entry) |
| 1127 if not os.path.splitext(library)[1]: |
| 1128 library += '.lib' |
| 1127 if library not in found: | 1129 if library not in found: |
| 1128 found.add(library) | 1130 found.add(library) |
| 1129 unique_libraries_list.append(library) | 1131 unique_libraries_list.append(library) |
| 1130 unique_libraries_list.reverse() | 1132 unique_libraries_list.reverse() |
| 1131 return unique_libraries_list | 1133 return unique_libraries_list |
| 1132 | 1134 |
| 1133 | 1135 |
| 1134 def _GetOutputFilePathAndTool(spec, msbuild): | 1136 def _GetOutputFilePathAndTool(spec, msbuild): |
| 1135 """Returns the path and tool to use for this target. | 1137 """Returns the path and tool to use for this target. |
| 1136 | 1138 |
| (...skipping 2019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3156 action_spec.extend( | 3158 action_spec.extend( |
| 3157 # TODO(jeanluc) 'Document' for all or just if as_sources? | 3159 # TODO(jeanluc) 'Document' for all or just if as_sources? |
| 3158 [['FileType', 'Document'], | 3160 [['FileType', 'Document'], |
| 3159 ['Command', command], | 3161 ['Command', command], |
| 3160 ['Message', description], | 3162 ['Message', description], |
| 3161 ['Outputs', outputs] | 3163 ['Outputs', outputs] |
| 3162 ]) | 3164 ]) |
| 3163 if additional_inputs: | 3165 if additional_inputs: |
| 3164 action_spec.append(['AdditionalInputs', additional_inputs]) | 3166 action_spec.append(['AdditionalInputs', additional_inputs]) |
| 3165 actions_spec.append(action_spec) | 3167 actions_spec.append(action_spec) |
| OLD | NEW |