Skip to content

Commit bf08ca4

Browse files
committed
deps,test: fixed failures
Signed-off-by: Paolo Insogna <paolo@cowtech.it>
1 parent 2dccd3d commit bf08ca4

7 files changed

Lines changed: 21 additions & 10 deletions

File tree

.github/workflows/test-shared.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ jobs:
196196
--arg ccache "${NIX_SCCACHE:-null}" \
197197
--arg devTools '[]' \
198198
--arg benchmarkTools '[]' \
199-
${{ endsWith(matrix.system, '-darwin') && '--arg withAmaro false --arg withLief false --arg withSQLite false --arg extraConfigFlags ''["--without-inspector" "--without-node-options"]'' \' || '\' }}
199+
${{ endsWith(matrix.system, '-darwin') && '--arg withAmaro false --arg withLief false --arg withSQLite false --arg withFFI false --arg extraConfigFlags ''["--without-inspector" "--without-node-options"]'' \' || '\' }}
200200
--run '
201201
make -C "$TAR_DIR" run-ci -j4 V=1 TEST_CI_ARGS="-p actions --measure-flakiness 9 --skip-tests=$CI_SKIP_TESTS"
202202
' "$TAR_DIR/shell.nix"

deps/libffi/preprocess_asm.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,27 @@ def find_compiler():
3232
raise RuntimeError('Unable to locate a compiler for preprocessing assembly')
3333

3434

35+
def normalize_path(value):
36+
return str(value).strip().strip('"')
37+
38+
3539
def preprocess(args):
3640
compiler = find_compiler()
37-
output = Path(args.output)
41+
input_path = normalize_path(args.input)
42+
output = Path(normalize_path(args.output))
43+
include_dirs = [normalize_path(include_dir) for include_dir in args.include_dir]
3844
output.parent.mkdir(parents=True, exist_ok=True)
3945

4046
if os.name == 'nt' and Path(compiler[0]).name.lower() in ('cl.exe', 'cl', 'clang-cl.exe', 'clang-cl'):
4147
command = compiler + ['/nologo', '/EP', '/TC']
42-
command += [f'/I{include_dir}' for include_dir in args.include_dir]
48+
command += [f'/I{include_dir}' for include_dir in include_dirs]
4349
command += [f'/D{define}' for define in args.define]
44-
command += [args.input]
50+
command += [input_path]
4551
else:
4652
command = compiler + ['-E', '-P', '-x', 'c']
47-
command += [f'-I{include_dir}' for include_dir in args.include_dir]
53+
command += [f'-I{include_dir}' for include_dir in include_dirs]
4854
command += [f'-D{define}' for define in args.define]
49-
command += [args.input]
55+
command += [input_path]
5056

5157
result = subprocess.run(command, capture_output=True, text=True)
5258
if result.returncode != 0:

lib/internal/process/permission.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

33
const {
4-
Boolean,
54
ObjectFreeze,
65
} = primordials;
76

shell.nix

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
withLief ? true,
1717
withQuic ? false,
1818
withSQLite ? true,
19+
withFFI ? true,
1920
withSSL ? true,
2021
withTemporal ? false,
2122
sharedLibDeps ?
@@ -26,6 +27,7 @@
2627
withLief
2728
withQuic
2829
withSQLite
30+
withFFI
2931
withSSL
3032
withTemporal
3133
;
@@ -61,6 +63,7 @@ let
6163
++ pkgs.lib.optional (!withLief) "--without-lief"
6264
++ pkgs.lib.optional withQuic "--experimental-quic"
6365
++ pkgs.lib.optional (!withSQLite) "--without-sqlite"
66+
++ pkgs.lib.optional (!withFFI) "--without-ffi"
6467
++ pkgs.lib.optional (!withSSL) "--without-ssl"
6568
++ pkgs.lib.optional withTemporal "--v8-enable-temporal-support"
6669
++ pkgs.lib.optional (ninja != null) "--ninja"

src/node_metadata.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#endif // HAVE_SQLITE
1818
#if HAVE_FFI
1919
#include "ffi.h"
20-
#endif // HAVE_FFI && !NODE_SHARED_FFI
20+
#endif // HAVE_FFI
2121
#include "undici_version.h"
2222
#include "util.h"
2323
#include "uv.h"

test/parallel/test-process-get-builtin.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { hasCrypto, hasIntl, hasInspector, hasSQLite, hasFFI } from '../common/index.mjs';
1+
import { hasCrypto, hasIntl, hasInspector, hasSQLite } from '../common/index.mjs';
22
import assert from 'node:assert';
33
import { builtinModules } from 'node:module';
44
import { isMainThread } from 'node:worker_threads';

tools/nix/sharedLibDeps.nix

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
withQuic ? false,
55
withSQLite ? true,
66
withSSL ? true,
7+
withFFI ? true,
78
withTemporal ? false,
89
}:
910
{
@@ -20,7 +21,6 @@
2021
zlib
2122
zstd
2223
;
23-
ffi = pkgs.libffi;
2424
cares = pkgs.c-ares;
2525
hdr-histogram = pkgs.hdrhistogram_c;
2626
http-parser = pkgs.llhttp;
@@ -47,6 +47,9 @@
4747
// (pkgs.lib.optionalAttrs withSQLite {
4848
inherit (pkgs) sqlite;
4949
})
50+
// (pkgs.lib.optionalAttrs withFFI {
51+
inherit (pkgs) ffi;
52+
})
5053
// (pkgs.lib.optionalAttrs withSSL (
5154
let
5255
version = "3.5.5";

0 commit comments

Comments
 (0)