mirror of https://github.com/nodejs/node.git
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>pull/21530/merge
parent
1f32cca6f9
commit
83ab3bfeda
|
@ -1074,8 +1074,14 @@ def configure_library(lib, output):
|
||||||
|
|
||||||
# libpath needs to be provided ahead libraries
|
# libpath needs to be provided ahead libraries
|
||||||
if options.__dict__[shared_lib + '_libpath']:
|
if options.__dict__[shared_lib + '_libpath']:
|
||||||
output['libraries'] += [
|
if flavor == 'win':
|
||||||
'-L%s' % options.__dict__[shared_lib + '_libpath']]
|
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:
|
elif pkg_libpath:
|
||||||
output['libraries'] += [pkg_libpath]
|
output['libraries'] += [pkg_libpath]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue