Skip to content

Commit

Permalink
Invoke gyp with arch instead of target_arch (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
gergof committed Feb 1, 2024
1 parent c242a37 commit f8d82a1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gypbuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function runGyp (opts, target, cb) {
} else {
args.push('--target=' + target)
}
args.push('--target_arch=' + opts.arch)
args.push('--arch=' + opts.arch)
if (opts.runtime === 'electron') {
args.push('--runtime=electron')
args.push('--dist-url=https://electronjs.org/headers')
Expand Down
4 changes: 2 additions & 2 deletions test/gypbuild-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test('gyp is invoked with correct arguments, release mode', function (t) {
arch: 'fooarch',
gyp: {
parseArgv: function (args) {
t.deepEqual(args, ['node', 'index.js', 'rebuild', '--target=x.y.z', '--target_arch=fooarch'], 'correct arguments')
t.deepEqual(args, ['node', 'index.js', 'rebuild', '--target=x.y.z', '--arch=fooarch'], 'correct arguments')
},
commands: {
rebuild: function (args) {
Expand Down Expand Up @@ -69,7 +69,7 @@ test('gyp is invoked with correct arguments, debug mode', function (t) {
debug: true,
gyp: {
parseArgv: function (args) {
t.deepEqual(args, ['node', 'index.js', 'rebuild', '--target=x.y.z', '--target_arch=fooarch', '--debug'], 'correct arguments')
t.deepEqual(args, ['node', 'index.js', 'rebuild', '--target=x.y.z', '--arch=fooarch', '--debug'], 'correct arguments')
},
commands: {
rebuild: function (args) {
Expand Down

0 comments on commit f8d82a1

Please sign in to comment.