From 5f390ae5e8857ad8c4d0a8b00818eadd8d8f4daa Mon Sep 17 00:00:00 2001
From: Alethea Rose <alethea@alethearose.com>
Date: Tue, 14 Feb 2017 23:11:03 -0500
Subject: [PATCH 05/23] Remove .lib suffix on linked libraries

---
 node.gyp                 | 32 ++++++++++++++++----------------
 tools/v8_gypfiles/v8.gyp | 28 +++++++++++++---------------
 2 files changed, 29 insertions(+), 31 deletions(-)

diff --git a/node.gyp b/node.gyp
index fc14d6e5..e9368ae7 100644
--- a/node.gyp
+++ b/node.gyp
@@ -650,9 +650,9 @@
         }],
         ['OS=="win"', {
           'libraries': [
-            'Dbghelp.lib',
-            'winmm.lib',
-            'Ws2_32.lib',
+            '-ldbghelp',
+            '-lwinmm',
+            '-lws2_32',
           ],
         }],
         ['node_with_ltcg=="true"', {
@@ -933,10 +933,10 @@
             }],
           ],
           'libraries': [
-            'Dbghelp',
-            'Psapi',
-            'Winmm',
-            'Ws2_32',
+            '-ldbghelp',
+            '-lpsapi',
+            '-lwinmm',
+            '-lws2_32',
           ],
         }],
         [ 'node_use_openssl=="true"', {
@@ -1245,9 +1245,9 @@
         }],
         ['OS=="win"', {
           'libraries': [
-            'Dbghelp.lib',
-            'winmm.lib',
-            'Ws2_32.lib',
+            '-ldbghelp',
+            '-lwinmm',
+            '-lws2_32',
           ],
         }],
         # Avoid excessive LTO
@@ -1301,9 +1301,9 @@
         }],
         ['OS=="win"', {
           'libraries': [
-            'Dbghelp.lib',
-            'winmm.lib',
-            'Ws2_32.lib',
+            '-ldbghelp',
+            '-lwinmm',
+            '-lws2_32',
           ],
         }],
         # Avoid excessive LTO
@@ -1429,9 +1429,9 @@
         }],
         ['OS=="win"', {
           'libraries': [
-            'Dbghelp.lib',
-            'winmm.lib',
-            'Ws2_32.lib',
+            '-ldbghelp',
+            '-lwinmm',
+            '-lws2_32',
           ],
         }],
         # Avoid excessive LTO
diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp
index 32f00097..494aebc4 100644
--- a/tools/v8_gypfiles/v8.gyp
+++ b/tools/v8_gypfiles/v8.gyp
@@ -1503,14 +1503,12 @@
           ],
           'defines': ['_CRT_RAND_S'], # for rand_s()
           'direct_dependent_settings': {
-            'msvs_settings': {
-              'VCLinkerTool': {
-                'AdditionalDependencies': [
-                  'dbghelp.lib',
-                  'winmm.lib',
-                  'ws2_32.lib'
-                ]
-              }
+            'link_settings': {
+              'libraries': [
+                '-ldbghelp',
+                '-lwinmm',
+                '-lws2_32'
+              ],
             },
             'conditions': [
               ['v8_enable_etw_stack_walking==1', {
@@ -1803,13 +1801,13 @@
           'RuntimeTypeInfo': 'true',
           'ExceptionHandling': 1,
         },
-        'VCLinkerTool': {
-          'AdditionalDependencies': [
-            'dbghelp.lib',
-            'winmm.lib',
-            'ws2_32.lib'
-          ]
-        }
+      },
+      'link_settings': {
+        'libraries': [
+          '-ldbghelp',
+          '-lwinmm',
+          '-lws2_32'
+        ],
       },
       'sources': [
         "<(V8_ROOT)/src/torque/torque.cc",
-- 
2.17.0.windows.1
