Skip to content

Commit 740a45d

Browse files
committed
deps,test: fixed failures
Signed-off-by: Paolo Insogna <paolo@cowtech.it>
1 parent 570ba85 commit 740a45d

3 files changed

Lines changed: 12 additions & 5 deletions

File tree

deps/libffi/libffi.gyp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
['target_arch == "x64"', {
5656
'variables': {
5757
'libffi_arch_sources': [
58+
'src/x86/ffiw64.c',
5859
'src/x86/ffi64.c',
5960
'src/x86/unix64.S',
6061
],
@@ -83,6 +84,7 @@
8384
['target_arch == "x64"', {
8485
'variables': {
8586
'libffi_arch_sources': [
87+
'src/x86/ffiw64.c',
8688
'src/x86/ffi64.c',
8789
'src/x86/unix64.S',
8890
],
@@ -137,7 +139,8 @@
137139
'action': [
138140
'<(python)',
139141
'generate-headers.py',
140-
'--output-dir=<(INTERMEDIATE_DIR)',
142+
'--output-dir',
143+
'<(INTERMEDIATE_DIR)',
141144
'--target-arch',
142145
'<(target_arch)',
143146
'--os',

test/ffi/ffi-test-common.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,14 @@ function sleep(ms) {
2727
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, ms);
2828
}
2929

30+
function getCompiler(defaultCompiler) {
31+
return process.env.CC?.trim() || defaultCompiler;
32+
}
33+
3034
function getBuildCommand() {
3135
if (process.platform === 'win32') {
3236
return {
33-
command: process.env.CC || 'cl',
37+
command: getCompiler('cl'),
3438
args: [
3539
'/nologo',
3640
'/LD',
@@ -44,7 +48,7 @@ function getBuildCommand() {
4448

4549
if (process.platform === 'darwin') {
4650
return {
47-
command: process.env.CC || 'cc',
51+
command: getCompiler('cc'),
4852
args: [
4953
'-dynamiclib',
5054
'-fPIC',
@@ -56,7 +60,7 @@ function getBuildCommand() {
5660
}
5761

5862
return {
59-
command: process.env.CC || 'cc',
63+
command: getCompiler('cc'),
6064
args: [
6165
'-shared',
6266
'-fPIC',

test/ffi/test-ffi-permission-allow-cli.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Flags: --permission --allow-ffi --allow-child-process --experimental-ffi --allow-fs-read=*
1+
// Flags: --permission --allow-ffi --allow-child-process --experimental-ffi --allow-fs-read=* --allow-fs-write=*
22
'use strict';
33

44
const { skipIfFFIMissing } = require('../common');

0 commit comments

Comments
 (0)