Skip to content

build, tools, win: add .S files support to GYP - #24553

Closed
bzoz wants to merge 2 commits into
nodejs:masterfrom
JaneaSystems:bartek-gyp-s-files
Closed

build, tools, win: add .S files support to GYP#24553
bzoz wants to merge 2 commits into
nodejs:masterfrom
JaneaSystems:bartek-gyp-s-files

Conversation

@bzoz

@bzozbzoz commented Nov 21, 2018

Copy link
Copy Markdown
Contributor

Makes GYP properly handle .S files.

Fixes: nodejs/node-v8#89

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Makes GYP properly handle .S files.
Fixes: nodejs/node-v8#89
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-botnodejs-github-bot added build Issues and PRs related to build files or the CI. tools Issues and PRs related to the tools directory. labels Nov 21, 2018
@targos

targos commented Nov 21, 2018

Copy link
Copy Markdown
Member

Tentative CI on top of canary-base: https://ci.nodejs.org/job/node-test-commit-windows-fanned/22588/

Edit: rebase cannot work ofc. Let me apply it manually...

Edit: https://ci.nodejs.org/job/node-test-commit-windows-fanned/22589/ (on https://github.com/targos/node/commits/test-24553)

@refackrefack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM % nit

elif ext == '.asm':
group = 'masm'
element = 'MASM'
elif ext == '.S':

@refackrefackNov 21, 2018

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd suggest doing it like this

Suggested change
elifext=='.S':
elifext.lower() in ['.asm', '.s']:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that equivalent? On Unices the convention is that .S should be run through cpp whereas .s should not. I don't know if that's applicable to usually-case-insensitive Windows.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT .s nor .S are standard for MSVS. It's more common to see .asm.
And in this case while the file indeed has .S semantics on Unices, cl.exe doesn't except it.

Seems like we have the same bug in ninja.py, so maybe the fix should be in v8.gyp, changing the extension to .asm iff Windows.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

elifext=='c'or (ext=='S'andself.flavor!='win'):
command='cc'
elifext=='s'andself.flavor!='win': # Doesn't generate .o.d files.
command='cc_s'
elif (self.flavor=='win'andext=='asm'and
notself.msvs_settings.HasExplicitAsmRules(spec)):
command='asm'
# Add the _asm suffix as msvs is capable of handling .cc and
# .asm files of the same name without collision.
obj_ext='_asm.obj'

@refackrefack added the gyp Issues and PRs related to the GYP tool and .gyp build files label Nov 21, 2018
@refack
refack changed the base branch from master to canary-baseNovember 21, 2018 13:37
@refack
refack changed the base branch from canary-base to masterNovember 21, 2018 13:38
@targos

Copy link
Copy Markdown
Member

The canary CI failed on 32bit but maybe it's unrelated?

https://ci.nodejs.org/job/node-compile-windows/22547/label=win-vs2017-x86/console

@refack

Copy link
Copy Markdown
Contributor

The canary CI failed on 32bit but maybe it's unrelated?

Error seems unrelated as it refers to an .h file. Also it's in v8_base_2 which is a dependency of v8_snapshot so it should be present in the job stated yesterday and refereed in nodejs/node-v8#89 - https://ci.nodejs.org/job/node-compile-windows/22413/label=win-vs2017-x86/console:

08:44:22 c:\workspace\node-compile-windows\deps\v8\src/ia32/assembler-ia32-inl.h(282): error C2440: '?': cannot convert from 'v8::internal::Code' to 'bool' (compiling source file ..\src\snapshot\startup-deserializer.cc) [c:\workspace\node-compile-windows\deps\v8\gypfiles\v8_base_2.vcxproj]
08:44:22 c:\workspace\node-compile-windows\deps\v8\src/ia32/assembler-ia32-inl.h(282): note: Ambiguous user-defined-conversion (compiling source file ..\src\snapshot\startup-deserializer.cc)
08:44:22 c:\workspace\node-compile-windows\deps\v8\src/ia32/assembler-ia32-inl.h(281): error C2660: 'v8::internal::Assembler::set_target_address_at': function does not take 2 arguments (compiling source file ..\src\snapshot\startup-deserializer.cc) [c:\workspace\node-compile-windows\deps\v8\gypfiles\v8_base_2.vcxproj]

@bzoz

bzoz commented Nov 22, 2018

Copy link
Copy Markdown
ContributorAuthor

Updated to support both lower and upper cases, PTAL.

@bzoz

bzoz commented Nov 29, 2018

Copy link
Copy Markdown
ContributorAuthor

@bzoz

bzoz commented Nov 29, 2018

Copy link
Copy Markdown
ContributorAuthor

Failures are unrelated.

@bzoz

bzoz commented Nov 29, 2018

Copy link
Copy Markdown
ContributorAuthor

Landed in 9920dbc

@bzozbzoz closed this Nov 29, 2018
pullBot pushed a commit to shakir-abdo/node that referenced this pull request Nov 29, 2018
Makes GYP properly handle .S files.
Fixes: nodejs/node-v8#89
PR-URL: nodejs#24553
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
targos pushed a commit that referenced this pull request Nov 29, 2018
Makes GYP properly handle .S files.
Fixes: nodejs/node-v8#89
PR-URL: #24553
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@BridgeARBridgeAR mentioned this pull request Dec 5, 2018
4 tasks
refack pushed a commit to refack/node that referenced this pull request Jan 14, 2019
Makes GYP properly handle .S files.
Fixes: nodejs/node-v8#89
PR-URL: nodejs#24553
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
BethGriggs pushed a commit that referenced this pull request Feb 12, 2019
Makes GYP properly handle .S files.
Fixes: nodejs/node-v8#89
PR-URL: #24553
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@BethGriggsBethGriggs mentioned this pull request Feb 12, 2019
rvagg pushed a commit that referenced this pull request Feb 28, 2019
Makes GYP properly handle .S files.
Fixes: nodejs/node-v8#89
PR-URL: #24553
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

buildIssues and PRs related to build files or the CI.gypIssues and PRs related to the GYP tool and .gyp build filestoolsIssues and PRs related to the tools directory.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken build on Windows

7 participants

@bzoz@nodejs-github-bot@targos@refack@bnoordhuis@addaleax@richardlau