From 94c39c604ec05c02e34860a2d3bf3c60ac5f4a7c Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 18 Apr 2017 02:20:56 -0400 Subject: [PATCH] gyp: fix ninja build failure (GYP patch) 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: https://github.com/nodejs/node/pull/12484 Fixes: https://github.com/nodejs/node/issues/12448 Reviewed-By: Benjamin Gruenbaum Reviewed-By: James M Snell Reviewed-By: Refael Ackermann Reviewed-By: Gibson Fahnestock --- gyp/pylib/gyp/generator/ninja.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gyp/pylib/gyp/generator/ninja.py b/gyp/pylib/gyp/generator/ninja.py index ba911c19dc..a00573ebf2 100644 --- a/gyp/pylib/gyp/generator/ninja.py +++ b/gyp/pylib/gyp/generator/ninja.py @@ -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(