Skip to content

Commit

Permalink
gyp: fix ninja build failure (GYP patch)
Browse files Browse the repository at this point in the history
Currently the files specified in libraries in node.gyp `cctest` target are
getting a '.lib' extension on windows when generated with ninja.
This commit adds a check to see if a file has a '.obj' extension and in
that case no '.lib' extension will be added.

Also, the LIBS specified in the 'libraries' section are not
being included in the --start-group --end-group section which
means that these libraries will not be searched causing issue
with linkers where the order matters.

PR-URL: nodejs/node#12484
Fixes: nodejs/node#12448
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Gibson Fahnestock <[email protected]>
  • Loading branch information
danbev authored and rvagg committed Aug 9, 2018
1 parent e8ea74e commit 94c39c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gyp/pylib/gyp/generator/ninja.py
Original file line number Diff line number Diff line change
Expand Up @@ -2091,13 +2091,13 @@ def GenerateOutputForConfig(target_list, target_dicts, data, params,
restat=True,
command=mtime_preserving_solink_base % {'suffix': '@$link_file_list'},
rspfile='$link_file_list',
rspfile_content='-Wl,--start-group $in -Wl,--end-group $solibs $libs',
rspfile_content='-Wl,--start-group $in $solibs $libs -Wl,--end-group',
pool='link_pool')
master_ninja.rule(
'link',
description='LINK $out',
command=('$ld $ldflags -o $out '
'-Wl,--start-group $in -Wl,--end-group $solibs $libs'),
'-Wl,--start-group $in $solibs $libs -Wl,--end-group'),
pool='link_pool')
elif flavor == 'win':
master_ninja.rule(
Expand Down

0 comments on commit 94c39c6

Please sign in to comment.