Returns the list of libraries for this configuration. Arguments: spec: The target dictionary containing the properties of the target. Returns: The list of directory paths.
(spec)
| 1286 | |
| 1287 | |
| 1288 | def _GetLibraries(spec): |
| 1289 | """Returns the list of libraries for this configuration. |
| 1290 | |
| 1291 | Arguments: |
| 1292 | spec: The target dictionary containing the properties of the target. |
| 1293 | Returns: |
| 1294 | The list of directory paths. |
| 1295 | """ |
| 1296 | libraries = spec.get("libraries", []) |
| 1297 | # Strip out -l, as it is not used on windows (but is needed so we can pass |
| 1298 | # in libraries that are assumed to be in the default library path). |
| 1299 | # Also remove duplicate entries, leaving only the last duplicate, while |
| 1300 | # preserving order. |
| 1301 | found = OrderedSet() |
| 1302 | unique_libraries_list = [] |
| 1303 | for entry in reversed(libraries): |
| 1304 | library = re.sub(r"^\-l", "", entry) |
| 1305 | if not os.path.splitext(library)[1]: |
| 1306 | library += ".lib" |
| 1307 | if library not in found: |
| 1308 | found.add(library) |
| 1309 | unique_libraries_list.append(library) |
| 1310 | unique_libraries_list.reverse() |
| 1311 | return unique_libraries_list |
| 1312 | |
| 1313 | |
| 1314 | def _GetOutputFilePathAndTool(spec, msbuild): |
no test coverage detected