mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 21:19:50 +01:00
build: make --shared-[...]-path work on Windows
The `-L<path>` syntax isn't recognized by link.exe, and gyp doesn't translate it properly. Without this, link.exe generates the following warning and fails to link: ``` LINK : warning LNK4044: unrecognized option '/LC:/Users/nornagon/...'; ignored ``` PR-URL: https://github.com/nodejs/node/pull/21530 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: João Reis <reis@janeasystems.com>
This commit is contained in:
parent
1f32cca6f9
commit
83ab3bfeda
10
configure
vendored
10
configure
vendored
@ -1074,8 +1074,14 @@ def configure_library(lib, output):
|
||||
|
||||
# libpath needs to be provided ahead libraries
|
||||
if options.__dict__[shared_lib + '_libpath']:
|
||||
output['libraries'] += [
|
||||
'-L%s' % options.__dict__[shared_lib + '_libpath']]
|
||||
if flavor == 'win':
|
||||
if 'msvs_settings' not in output:
|
||||
output['msvs_settings'] = { 'VCLinkerTool': { 'AdditionalOptions': [] } }
|
||||
output['msvs_settings']['VCLinkerTool']['AdditionalOptions'] += [
|
||||
'/LIBPATH:%s' % options.__dict__[shared_lib + '_libpath']]
|
||||
else:
|
||||
output['libraries'] += [
|
||||
'-L%s' % options.__dict__[shared_lib + '_libpath']]
|
||||
elif pkg_libpath:
|
||||
output['libraries'] += [pkg_libpath]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user