Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: shrink bloated addon binaries on windows #2060

Closed
wants to merge 1 commit into from

Conversation

codebytere
Copy link
Member

Checklist

Description of change

Closes nodejs/node#29501.
Refs #1118.

Moves build-time optimizations to node-gyp to shrink the binary size accidentally bloated by a change to common.gypi in core. Also furthers the goal of decoupling addons from being affected by common.gypi changes.

Feel free to tell me if this isn't quite what the issue had in mind and i'll adapt accordingly.

cc @richardlau @deepak1556

@rvagg
Copy link
Member

rvagg commented Mar 4, 2020

Are there any backward compatibility concerns with this, or is it just going to impact size? It'd be good one to repeat the problems we had with duplicate symbol checking #1891

tagged @joaocgreis too

@codebytere
Copy link
Member Author

@rvagg to my knowledge this just affects size!

@rvagg
Copy link
Member

rvagg commented Mar 9, 2020

sgtm, would prefer one of our windows reviewers to sign off tho

Copy link
Contributor

@bzoz bzoz left a comment

Choose a reason for hiding this comment

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

LGTM!

Used this node-gyp to run Node vcbuild test-addons, everything was ok.

rvagg pushed a commit that referenced this pull request Mar 13, 2020
PR-URL: #2060
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
@rvagg
Copy link
Member

rvagg commented Mar 13, 2020

cool, landed @ e18a61a

@rvagg rvagg closed this Mar 13, 2020
@cclauss
Copy link
Contributor

cclauss commented Mar 13, 2020

Nice work. Size matters. Do we have a few anecdotes about how much smaller the new binaries are?

@rvagg
Copy link
Member

rvagg commented Mar 13, 2020

btw is there any reason to not backport this to 5.x?

@codebytere codebytere deleted the restore-ltcg-config branch April 13, 2020 21:52
@codebytere
Copy link
Member Author

@rvagg oops, this blew me by - no i don't think so, we should be fine to land this on 5.x

@codebytere
Copy link
Member Author

@rvagg what's the typical backport process for this? I can open a PR against the5.x branch if that'd be helpful?

@rvagg
Copy link
Member

rvagg commented May 6, 2020

Ah, not really a proper process or timeline for this. I normally just cherry-pick things not server-major, 5.x is super close to master anyway. I’ll try and do a batch this week and see what it looks like for a release. I guess were due for some action around here including a 7.x.

rvagg pushed a commit that referenced this pull request May 13, 2020
PR-URL: #2060
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
@rvagg rvagg mentioned this pull request May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

VC++ on v12+ builds bloated addon binaries.
4 participants