MCPcopy Create free account
hub / github.com/nodejs/node / _GetLibraries

Function _GetLibraries

tools/gyp/pylib/gyp/generator/msvs.py:1288–1311  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

1286
1287
1288def _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
1314def _GetOutputFilePathAndTool(spec, msbuild):

Callers 2

_FinalizeMSBuildSettingsFunction · 0.85

Calls 4

addMethod · 0.95
OrderedSetClass · 0.90
getMethod · 0.65
appendMethod · 0.45

Tested by

no test coverage detected