Skip to content

Update to node 24.1.0 #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: node-23
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
rubocop:
name: Lint (Rubocop)
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
container: ruby:3.1
steps:
- name: Checkout
Expand All @@ -17,7 +17,7 @@ jobs:
run: bundle exec rubocop -f simple
shellcheck:
name: Lint (Shellcheck)
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
container: debian:10
steps:
- name: Checkout
Expand All @@ -30,7 +30,7 @@ jobs:
name: Build (ruby)
outputs:
GEM_VERSION: ${{ steps.set-metadata.outputs.GEM_VERSION }}
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
container: ruby:3.1
steps:
- name: Update Rubygems and Bundler
Expand Down Expand Up @@ -77,12 +77,11 @@ jobs:
fail-fast: false
matrix:
platform:
- x86_64
- arm64
name: Build (darwin)
outputs:
GEM_VERSION: ${{ steps.set-metadata.outputs.GEM_VERSION }}
runs-on: macos-13
runs-on: macos-15-xlarge
env:
TARGET_PLATFORM: ${{ matrix.platform }}-darwin
RUBY_TARGET_PLATFORM: ${{ matrix.platform }}-darwin
Expand Down Expand Up @@ -162,7 +161,7 @@ jobs:
name: Build (linux)
outputs:
GEM_VERSION: ${{ steps.set-metadata.outputs.GEM_VERSION }}
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Set cross-compilation platform
id: platform
Expand Down Expand Up @@ -311,7 +310,7 @@ jobs:
libc: musl
name: Test (ruby) (${{ matrix.container.version }}, ${{ matrix.platform }}, ${{ matrix.container.libc }})
needs: build-ruby
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
container: ${{ matrix.container.image }}
steps:
- name: Install Alpine system dependencies
Expand Down Expand Up @@ -352,7 +351,7 @@ jobs:
# arm64
name: Test (darwin)
needs: build-darwin
runs-on: macos-13
runs-on: macos-15-xlarge
steps:
- name: Set metadata
id: set-metadata
Expand Down Expand Up @@ -404,7 +403,7 @@ jobs:
libc: 'gnu'
name: Test (linux)
needs: build-linux
runs-on: ubuntu-20.04
runs-on: ubuntu-24.04
steps:
- name: Enable ${{ matrix.platform }} platform
id: qemu
Expand Down
6 changes: 3 additions & 3 deletions lib/libv8/node/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Libv8
end

module Libv8::Node
VERSION = '23.8.0.0'
NODE_VERSION = '23.8.0'
LIBV8_VERSION = '12.9.202.28' # from src/node-.../deps/v8/include/v8-version.h
VERSION = '24.1.0.0'
NODE_VERSION = '24.1.0'
LIBV8_VERSION = '13.6.233.10' # from src/node-.../deps/v8/include/v8-version.h
end
13 changes: 12 additions & 1 deletion libexec/build-libv8
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ NJOBS="${NJOBS:-1}"
echo "parallel job count: ${NJOBS}"

BUILDTYPE="${BUILDTYPE:-Release}"
GITHUB_ACTIONS="${GITHUB_ACTIONS:-}"

cd "${src}/node-v${version}"

Expand Down Expand Up @@ -42,5 +43,15 @@ if [ "$host_platform" != "$target_platform" ] && [ "${target_platform%%-*}" = "a
find . -iname "*.host.mk" -exec sed -i '/-msign-return-address/d' {} ';'
fi

if [ "${BUILDTYPE}" = "Release" ] && [ "${GITHUB_ACTIONS}" != "" ]; then
case "${target_platform}" in
arm64*-darwin*)
# dwarf debug info for v8 is so massive the macos
# builder runs out of disk space when it's enabled
find out -name '*.mk' -exec sed -i '' -e 's/gdwarf-2/g0/g' {} ';'
;;
esac
fi

export PATH="${PWD}/out/tools/bin:${PATH}"
make -j"${NJOBS}" -C out BUILDTYPE="${BUILDTYPE}" V=0 CC=clang CC.host=clang CXX=clang++ CXX.host=clang++
make -j"${NJOBS}" -C out BUILDTYPE="${BUILDTYPE}" V=
6 changes: 3 additions & 3 deletions libexec/build-monolith
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ platform=$(uname)
rm -f "${LIBV8_MONOLITH}"
case "${platform}" in
"SunOS")
/usr/xpg4/bin/find . '(' '!' -path './icutools/deps/icu-small/source/stubdata/stubdata.o' ')' -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" | sort | uniq | xargs ar cq "${LIBV8_MONOLITH}"
/usr/xpg4/bin/find . '(' '!' -path './icutools/deps/icu-small/source/stubdata/stubdata.o' ')' -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" -or -path './abseil/deps/v8/third_party/abseil-cpp/absl/**/*.o' -or -path './highway/deps/v8/third_party/highway/**/*.o' -or -path './simdutf/deps/v8/third_party/simdutf/*.o' | sort | uniq | xargs ar cq "${LIBV8_MONOLITH}"
;;
"Darwin")
/usr/bin/find . '(' '!' -path './icutools/deps/icu-small/source/stubdata/stubdata.o' ')' -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" | sort | uniq | xargs /usr/bin/ar -cq "${LIBV8_MONOLITH}"
/usr/bin/find . '(' '!' -path './icutools/deps/icu-small/source/stubdata/stubdata.o' ')' -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" -or -path './abseil/deps/v8/third_party/abseil-cpp/absl/**/*.o' -or -path './highway/deps/v8/third_party/highway/**/*.o' -or -path './simdutf/deps/v8/third_party/simdutf/*.o' | sort | uniq | xargs /usr/bin/ar -cq "${LIBV8_MONOLITH}"
;;
"Linux")
find . '(' '!' -path './icutools/deps/icu-small/source/stubdata/stubdata.o' ')' -and '(' -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" ')' | sort | uniq | xargs ar -cqSP "${LIBV8_MONOLITH}"
find . '(' '!' -path './icutools/deps/icu-small/source/stubdata/stubdata.o' ')' -and '(' -path "./torque_*/**/*.o" -or -path "./v8*/**/*.o" -or -path "./icu*/**/*.o" -or -path './abseil/deps/v8/third_party/abseil-cpp/absl/**/*.o' -or -path './highway/deps/v8/third_party/highway/**/*.o' -or -path './simdutf/deps/v8/third_party/simdutf/*.o' ')' | sort | uniq | xargs ar -cqSP "${LIBV8_MONOLITH}"
ar -sP "${LIBV8_MONOLITH}"
;;
*)
Expand Down
1 change: 1 addition & 0 deletions libexec/extract-node
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ extract "${src}" "${src}/node-v${version}.tar.gz"

cd "${src}/node-v${version}"

patch -p1 < "${top}"/patch/v8-add-missing-typename.patch
patch -p1 < "${top}"/patch/v8-std-is-trivially-destructible.patch
patch -p1 < "${top}"/patch/v8-disable-madv-dontfork.patch
patch -p1 < "${top}"/patch/v8-disable-pkey.patch
30 changes: 15 additions & 15 deletions libexec/platform
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
set -e
set -u

if command -v clang >/dev/null 2>&1; then
CC="${CC:-clang}"
CXX="${CXX:-clang++}"
elif command -v gcc >/dev/null 2>&1; then
if command -v gcc >/dev/null 2>&1; then
CC="${CC:-gcc}"
CXX="${CXX:-g++}"
elif command -v clang >/dev/null 2>&1; then
CC="${CC:-clang}"
CXX="${CXX:-clang++}"
elif command -v cc >/dev/null 2>&1; then
CC="${CC:-cc}"
CXX="${CXX:-c++}"
Expand Down Expand Up @@ -142,17 +142,17 @@ fi
# ;;
# esac

if command -v ccache >/dev/null 2>&1; then
if [ -n "${CC:-}" ] && [ "${CC}" = "${CC#ccache}" ]; then
CC="ccache ${CC}"
CXX="ccache ${CXX}"
fi

if [ -n "${CC_host:-}" ] && [ "${CC_host}" = "${CC_host#ccache}" ]; then
CC_host="ccache ${CC_host}"
CXX_host="ccache ${CXX_host}"
fi
fi
#if command -v ccache >/dev/null 2>&1; then
# if [ -n "${CC:-}" ] && [ "${CC}" = "${CC#ccache}" ]; then
# CC="ccache ${CC}"
# CXX="ccache ${CXX}"
# fi
#
# if [ -n "${CC_host:-}" ] && [ "${CC_host}" = "${CC_host#ccache}" ]; then
# CC_host="ccache ${CC_host}"
# CXX_host="ccache ${CXX_host}"
# fi
#fi

cat <<EOF
export CC='${CC}'
Expand Down
66 changes: 66 additions & 0 deletions patch/v8-add-missing-typename.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
diff --git a/deps/v8/src/objects/ordered-hash-table.h b/deps/v8/src/objects/ordered-hash-table.h
index 0e1605d566..8145bb1b8a 100644
--- a/deps/v8/src/objects/ordered-hash-table.h
+++ b/deps/v8/src/objects/ordered-hash-table.h
@@ -70,7 +70,7 @@ class OrderedHashTable : public FixedArray {
// to add at least one new element.
template <template <typename> typename HandleType>
requires(std::is_convertible_v<HandleType<Derived>, DirectHandle<Derived>>)
- static HandleType<Derived>::MaybeType EnsureCapacityForAdding(
+ static typename HandleType<Derived>::MaybeType EnsureCapacityForAdding(
Isolate* isolate, HandleType<Derived> table);

// Returns an OrderedHashTable (possibly |table|) that's shrunken
@@ -218,11 +218,11 @@ class OrderedHashTable : public FixedArray {

template <template <typename> typename HandleType>
requires(std::is_convertible_v<HandleType<Derived>, DirectHandle<Derived>>)
- static HandleType<Derived>::MaybeType Rehash(Isolate* isolate,
+ static typename HandleType<Derived>::MaybeType Rehash(Isolate* isolate,
HandleType<Derived> table);
template <template <typename> typename HandleType>
requires(std::is_convertible_v<HandleType<Derived>, DirectHandle<Derived>>)
- static HandleType<Derived>::MaybeType Rehash(Isolate* isolate,
+ static typename HandleType<Derived>::MaybeType Rehash(Isolate* isolate,
HandleType<Derived> table,
int new_capacity);

@@ -287,7 +287,7 @@ class V8_EXPORT_PRIVATE OrderedHashSet
template <template <typename> typename HandleType>
requires(std::is_convertible_v<HandleType<OrderedHashSet>,
DirectHandle<OrderedHashSet>>)
- static HandleType<OrderedHashSet>::MaybeType Add(
+ static typename HandleType<OrderedHashSet>::MaybeType Add(
Isolate* isolate, HandleType<OrderedHashSet> table,
DirectHandle<Object> value);
static Handle<FixedArray> ConvertToKeysArray(Isolate* isolate,
@@ -296,12 +296,12 @@ class V8_EXPORT_PRIVATE OrderedHashSet
template <template <typename> typename HandleType>
requires(std::is_convertible_v<HandleType<OrderedHashSet>,
DirectHandle<OrderedHashSet>>)
- static HandleType<OrderedHashSet>::MaybeType Rehash(
+ static typename HandleType<OrderedHashSet>::MaybeType Rehash(
Isolate* isolate, HandleType<OrderedHashSet> table);
template <template <typename> typename HandleType>
requires(std::is_convertible_v<HandleType<OrderedHashSet>,
DirectHandle<OrderedHashSet>>)
- static HandleType<OrderedHashSet>::MaybeType Rehash(
+ static typename HandleType<OrderedHashSet>::MaybeType Rehash(
Isolate* isolate, HandleType<OrderedHashSet> table, int new_capacity);

template <typename IsolateT>
@@ -343,12 +343,12 @@ class V8_EXPORT_PRIVATE OrderedHashMap
template <template <typename> typename HandleType>
requires(std::is_convertible_v<HandleType<OrderedHashMap>,
DirectHandle<OrderedHashMap>>)
- static HandleType<OrderedHashMap>::MaybeType Rehash(
+ static typename HandleType<OrderedHashMap>::MaybeType Rehash(
Isolate* isolate, HandleType<OrderedHashMap> table);
template <template <typename> typename HandleType>
requires(std::is_convertible_v<HandleType<OrderedHashMap>,
DirectHandle<OrderedHashMap>>)
- static HandleType<OrderedHashMap>::MaybeType Rehash(
+ static typename HandleType<OrderedHashMap>::MaybeType Rehash(
Isolate* isolate, HandleType<OrderedHashMap> table, int new_capacity);

void SetEntry(InternalIndex entry, Tagged<Object> key, Tagged<Object> value);
1 change: 1 addition & 0 deletions sums/v24.1.0.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b565cba1dd8f2eb3db7c95e0c3a87ecc5e77f079611ea6a3688531511383ec72
Loading