diff options
author | Jeremy Apthorp <nornagon@nornagon.net> | 2018-06-25 12:28:03 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2018-08-12 03:46:21 -0700 |
commit | 83ab3bfedaedb13e16b8499c1d61dd21b2956e99 (patch) | |
tree | 305e2579307a5fac6371ce4c3df46ab60b582d13 /configure | |
parent | 1f32cca6f94838471b4053d591dd8e5499dff5a2 (diff) | |
download | node-new-83ab3bfedaedb13e16b8499c1d61dd21b2956e99.tar.gz |
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>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -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] |