diff --git a/build/commands/lib/config.js b/build/commands/lib/config.js index 4d40385fd04..abb49a36f99 100644 --- a/build/commands/lib/config.js +++ b/build/commands/lib/config.js @@ -26,6 +26,7 @@ const Config = function () { this.resourcesDir = path.join(this.rootDir, 'resources') this.defaultGClientFile = path.join(this.rootDir, '.gclient') this.gClientFile = process.env.MUON_GCLIENT_FILE || this.defaultGClientFile + this.targetArch = 'x64' this.buildProjects() } diff --git a/build/commands/scripts/build.js b/build/commands/scripts/build.js index c733db911ab..9f544b15357 100644 --- a/build/commands/scripts/build.js +++ b/build/commands/scripts/build.js @@ -9,6 +9,7 @@ program .option('--C ', 'build config (out/Debug, out/Release') .option('--muon', 'build muon') .option('--node', 'build node') + .option('--target_arch', 'target architecture', 'x64') .option('--no_args_update', 'don\'t copy args.gn to the output dir') .option('--no_branding_update', 'don\'t copy BRANDING to the chrome theme dir') .arguments('[build_config]') @@ -39,7 +40,7 @@ const buildNode = (options = config.defaultOptions) => { options.env.GYP_INCLUDE_LAST = 'electron/build/node/node.gypi' options.env.GYP_CHROMIUM_NO_ACTION = 0 options.env[config.pathEnvVar] = config.appendPath(options.env[config.pathEnvVar], config.buildToolsDir) - util.run('python', [path.join(config.buildToolsDir, 'gyp_chromium.py'), '-D', 'component=' + config.component, path.join(config.projects.node.dir, 'node.gyp')], options) + util.run('python', [path.join(config.buildToolsDir, 'gyp_chromium.py'), '-D', 'target_arch=' + config.targetArch, '-D', 'component=' + config.component, path.join(config.projects.node.dir, 'node.gyp')], options) util.run('ninja', ['-C', config.outputDir, 'node'], options) }