Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
```
  • Loading branch information
nornagon committed Jun 25, 2018
commit e8263cbc29817585f05901d4b25b1660c9eb9bec
10 changes: 8 additions & 2 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1020,8 +1020,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