Skip to content

Commit

Permalink
Fix ia32 case: nwjs/nw.js#7104: using clang to build native modules
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerwang committed Sep 18, 2019
1 parent 392ac70 commit 1eb5e1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ function build (gyp, argv, callback) {
argv.push('/p:LinkToolExe=lld-link.exe')
argv.push('/p:CLToolPath=' + path.resolve(__dirname, '..', 'clang'))
argv.push('/p:LinkToolPath=' + path.resolve(__dirname, '..', 'clang'))
if (arch.toLowerCase() === 'ia32') {
process.env.CL='-m32'
}
}
}

Expand Down Expand Up @@ -255,7 +258,7 @@ function build (gyp, argv, callback) {
}
}

var proc = gyp.spawn(command, argv)
var proc = gyp.spawn(command, argv, {env: process.env})
proc.on('exit', onExit)
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"bindings",
"gyp"
],
"version": "3.6.4",
"version": "3.6.5",
"installVersion": 9,
"author": "Roger Wang <wenrui@gmail.com> (based on node-gyp)",
"repository": { "type": "git", "url": "https://github.com/nwjs/nw-gyp.git" },
Expand Down

0 comments on commit 1eb5e1b

Please sign in to comment.