Skip to content

Commit c21e4cb

Browse files
committed
fixup! tools: cache V8 on test-shared workflow
1 parent 94dce4b commit c21e4cb

File tree

4 files changed

+20
-7
lines changed

4 files changed

+20
-7
lines changed

node.gyp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,6 @@
641641
'xcode_settings': {
642642
'OTHER_LDFLAGS': [
643643
'-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)<(node_core_target_name)<(STATIC_LIB_SUFFIX)',
644-
'-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)v8_base_without_compiler<(STATIC_LIB_SUFFIX)',
645644
],
646645
},
647646
'msvs_settings': {
@@ -653,6 +652,13 @@
653652
},
654653
},
655654
'conditions': [
655+
['node_use_bundled_v8=="true"', {
656+
'xcode_settings': {
657+
'OTHER_LDFLAGS': [
658+
'-Wl,-force_load,<(PRODUCT_DIR)/<(STATIC_LIB_PREFIX)v8_base_without_compiler<(STATIC_LIB_SUFFIX)',
659+
],
660+
}
661+
}]
656662
['OS != "aix" and OS != "os400" and OS != "mac" and OS != "ios"', {
657663
'ldflags': [
658664
'-Wl,--whole-archive',
@@ -1530,6 +1536,9 @@
15301536
'src/builtin_info.cc',
15311537
],
15321538
'conditions': [
1539+
[ 'OS=="mac"', {
1540+
'libraries': [ '-framework CoreFoundation -framework Security' ],
1541+
}],
15331542
[ 'node_shared_simdutf=="false"', {
15341543
'dependencies': [ 'tools/v8_gypfiles/v8.gyp:simdutf#host' ],
15351544
}],

tools/nix/configureFlags.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ in
4444
++ pkgs.lib.optional (!withSSL) "--without-ssl"
4545
++ pkgs.lib.optional withTemporal "--v8-enable-temporal-support"
4646
++ pkgs.lib.optional (ninja != null) "--ninja"
47-
++ pkgs.lib.optional loadJSBuiltinsDynamically "--node-builtin-modules-path=${builtins.toString ./.}"
47+
++ pkgs.lib.optional loadJSBuiltinsDynamically "--node-builtin-modules-path=${builtins.toString ../..}"
4848
++ pkgs.lib.concatMap (name: [
4949
"--shared-${name}"
5050
"--shared-${name}-libpath=${pkgs.lib.getLib sharedLibDeps.${name}}/lib"

tools/nix/sharedLibDeps.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
merve
1616
nbytes
1717
simdjson
18-
simdutf
18+
# simdutf
1919
uvwasi
2020
zlib
2121
zstd

tools/nix/v8.nix

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,25 @@ pkgs.stdenv.mkDerivation (finalAttrs: {
8383
buildInputs = [ icu ] ++ builtins.attrValues sharedLibDeps;
8484

8585
buildPhase = ''
86-
ninja -C out/Release v8_snapshot v8_libplatform
86+
ninja -v -C out/Release v8_snapshot v8_libplatform
8787
'';
8888
installPhase = ''
89-
install -Dm644 out/Release/libabseil.* out/Release/libhighway.* out/Release/libv8_* -t $out/lib
89+
install -Dm644 out/Release/lib* -t $out/lib
90+
libs=$(for f in $out/lib/lib*.a; do
91+
b=$(basename "$f" .a)
92+
printf " -l%s" "''${b#lib}"
93+
done)
9094
9195
# copy v8 headers
9296
cp -r deps/v8/include $out/
9397
9498
# create a pkgconfig file for v8
9599
mkdir -p $out/lib/pkgconfig
96-
cat > $out/lib/pkgconfig/v8.pc << EOF
100+
cat -> $out/lib/pkgconfig/v8.pc << EOF
97101
Name: v8
98102
Description: V8 JavaScript Engine
99103
Version: ${version}
100-
Libs: -L$out/lib -labseil -lhighway -lv8_base_without_compiler -lv8_compiler -lv8_init -lv8_initializers -lv8_initializers_slow -lv8_libbase -lv8_libplatform -lv8_snapshot -lv8_zlib
104+
Libs: -L$out/lib $libs
101105
Cflags: -I$out/include
102106
EOF
103107
'';

0 commit comments

Comments
 (0)