Avoid copying around node.lib on Windows #537
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Imagine a Jenkins build server, where node-gyp chooses a dev dir of say
C:\Users\jenkins\.node-gyp\0.10.29\
. The build server runs multiple build jobs in parallel, each with disjoint working directories, but sharing global state such as the node-gyp dev dir. Some of these build jobs are using node-gyp to build 32-bit binaries, and some are using node-gyp to build 64-bit binaries. Sometimes the following scenario could previously occur:C:\Users\jenkins\.node-gyp\0.10.29\ia32\node.lib
toC:\Users\jenkins\.node-gyp\0.10.29\Release\node.lib
C:\Users\jenkins\.node-gyp\0.10.29\x64\node.lib
toC:\Users\jenkins\.node-gyp\0.10.29\Release\node.lib
C:\Users\jenkins\.node-gyp\0.10.29\Release\node.lib
is of the wrong architecture.This commit avoids the above scenario by making the dev dir immutable, and making the generated vcxproj files refer directly to the node.lib file for the appropriate architecture.
This is rather similar to #443 / #450.