From 160d2d23030728161ec6fa7815bdb3da422ed4f1 Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Wed, 21 Nov 2018 14:28:24 +0100 Subject: [PATCH 1/2] build, tools, win: add .S files support to GYP Makes GYP properly handle .S files. Fixes: https://github.com/nodejs/node-v8/issues/89 --- tools/gyp/pylib/gyp/generator/msvs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/gyp/pylib/gyp/generator/msvs.py b/tools/gyp/pylib/gyp/generator/msvs.py index 8fe9e5af23dd38..ba585b1bfc5a10 100644 --- a/tools/gyp/pylib/gyp/generator/msvs.py +++ b/tools/gyp/pylib/gyp/generator/msvs.py @@ -2171,6 +2171,9 @@ def _MapFileToMsBuildSourceType(source, rule_dependencies, elif ext == '.asm': group = 'masm' element = 'MASM' + elif ext == '.S': + group = 'masm' + element = 'MASM' elif ext == '.idl': group = 'midl' element = 'Midl' From 2fed1a3c21f0f7a3dcd2d1d7f0247324b4c93923 Mon Sep 17 00:00:00 2001 From: Bartosz Sosnowski Date: Thu, 22 Nov 2018 11:25:19 +0100 Subject: [PATCH 2/2] fixup: support both upper and lower case filenames --- tools/gyp/pylib/gyp/generator/msvs.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/gyp/pylib/gyp/generator/msvs.py b/tools/gyp/pylib/gyp/generator/msvs.py index ba585b1bfc5a10..923e897e486f7c 100644 --- a/tools/gyp/pylib/gyp/generator/msvs.py +++ b/tools/gyp/pylib/gyp/generator/msvs.py @@ -2156,6 +2156,7 @@ def _MapFileToMsBuildSourceType(source, rule_dependencies, A pair of (group this file should be part of, the label of element) """ _, ext = os.path.splitext(source) + ext = ext.lower() if ext in extension_to_rule_name: group = 'rule' element = extension_to_rule_name[ext] @@ -2168,10 +2169,7 @@ def _MapFileToMsBuildSourceType(source, rule_dependencies, elif ext == '.rc': group = 'resource' element = 'ResourceCompile' - elif ext == '.asm': - group = 'masm' - element = 'MASM' - elif ext == '.S': + elif ext in ['.s', '.asm']: group = 'masm' element = 'MASM' elif ext == '.idl':