Skip to content

Commit 1eb5e1b

Browse files
committed
Fix ia32 case: nwjs/nw.js#7104: using clang to build native modules
1 parent 392ac70 commit 1eb5e1b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

lib/build.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ function build (gyp, argv, callback) {
211211
argv.push('/p:LinkToolExe=lld-link.exe')
212212
argv.push('/p:CLToolPath=' + path.resolve(__dirname, '..', 'clang'))
213213
argv.push('/p:LinkToolPath=' + path.resolve(__dirname, '..', 'clang'))
214+
if (arch.toLowerCase() === 'ia32') {
215+
process.env.CL='-m32'
216+
}
214217
}
215218
}
216219

@@ -255,7 +258,7 @@ function build (gyp, argv, callback) {
255258
}
256259
}
257260

258-
var proc = gyp.spawn(command, argv)
261+
var proc = gyp.spawn(command, argv, {env: process.env})
259262
proc.on('exit', onExit)
260263
}
261264

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"bindings",
1212
"gyp"
1313
],
14-
"version": "3.6.4",
14+
"version": "3.6.5",
1515
"installVersion": 9,
1616
"author": "Roger Wang <[email protected]> (based on node-gyp)",
1717
"repository": { "type": "git", "url": "https://github.com/nwjs/nw-gyp.git" },

0 commit comments

Comments
 (0)