diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 921d945..b308043 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/lib/libv8/node/version.rb b/lib/libv8/node/version.rb index 3635851..882eca6 100644 --- a/lib/libv8/node/version.rb +++ b/lib/libv8/node/version.rb @@ -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 diff --git a/libexec/build-libv8 b/libexec/build-libv8 index f19b58f..9f75611 100755 --- a/libexec/build-libv8 +++ b/libexec/build-libv8 @@ -14,6 +14,7 @@ NJOBS="${NJOBS:-1}" echo "parallel job count: ${NJOBS}" BUILDTYPE="${BUILDTYPE:-Release}" +GITHUB_ACTIONS="${GITHUB_ACTIONS:-}" cd "${src}/node-v${version}" @@ -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= diff --git a/libexec/build-monolith b/libexec/build-monolith index b6ffc15..ece3228 100755 --- a/libexec/build-monolith +++ b/libexec/build-monolith @@ -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}" ;; *) diff --git a/libexec/extract-node b/libexec/extract-node index 61b5b2a..9357624 100755 --- a/libexec/extract-node +++ b/libexec/extract-node @@ -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 diff --git a/libexec/platform b/libexec/platform index 74ea826..d38cc75 100755 --- a/libexec/platform +++ b/libexec/platform @@ -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++}" @@ -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 < typename HandleType> + requires(std::is_convertible_v, DirectHandle>) +- static HandleType::MaybeType EnsureCapacityForAdding( ++ static typename HandleType::MaybeType EnsureCapacityForAdding( + Isolate* isolate, HandleType table); + + // Returns an OrderedHashTable (possibly |table|) that's shrunken +@@ -218,11 +218,11 @@ class OrderedHashTable : public FixedArray { + + template