Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Commit

Permalink
chore: make --shared-[...]-path work on Windows (#41)
Browse files Browse the repository at this point in the history
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
```

See nodejs/node#21530
  • Loading branch information
nornagon authored and codebytere committed Aug 29, 2018
1 parent 703e46a commit b175a5a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1051,8 +1051,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]

Expand Down

0 comments on commit b175a5a

Please sign in to comment.