From: Dane Springmeyer Date: Thu, 31 Jul 2014 03:51:23 +0000 (-0700) Subject: fix node to build with target_arch=x64 on linux X-Git-Tag: v0.15.2~8^2~3 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=978f73756b12cd1943206fa404a8798490a9121c;p=electron.git fix node to build with target_arch=x64 on linux atom-shell on linux is incorrectly reporting `ia32` for `process.arch`. This is happening because `-Dtarget_arch=ia32` is passed to ninja on linux inside `script/update.py` which leads to '-DARCH="ia32"' being set in the compile flags. I see that the current intention is to target 64 bit builds on linux (37275c64cd07) and the binaries are in fact compiled as 64 bit despite this bug. I guess ninja is somehow smartly ignoring the incorrect setting of the `-m32` flags at https://github.com/atom/node/blob/6d772c3cda0bb8270857397e128ea1e36c361125/common.gypi#L175-L178. Until this is fixed it breaks usage of any node-pre-gyp packaged node addons because node-pre-gyp depends on process.arch being correct in order to require the right binary arch. --- diff --git a/script/update.py b/script/update.py index 63b7b4f7..7c5a8893 100755 --- a/script/update.py +++ b/script/update.py @@ -23,11 +23,10 @@ def update_external_binaries(): def update_gyp(): gyp = os.path.join('vendor', 'brightray', 'vendor', 'gyp', 'gyp_main.py') python = sys.executable - if sys.platform == 'cygwin': + arch = 'x64' + if sys.platform in ['cygwin', 'win32']: python = os.path.join('vendor', 'python_26', 'python.exe') - arch = 'ia32' - if sys.platform == 'darwin': - arch = 'x64' + arch = 'ia32' subprocess.call([python, gyp, '-f', 'ninja', '--depth', '.', 'atom.gyp', '-Icommon.gypi', '-Ivendor/brightray/brightray.gypi',