Skip to content
Merged
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
62 changes: 56 additions & 6 deletions .github/workflows/build-reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,38 +66,50 @@ jobs:
package_json_arch: "arm64"
CMAKE_BUILD_TYPE: "Release"
RELEASE_FLAGS: "-O3 -DNDEBUG=1"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
Comment on lines +69 to +70

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 The PR title/description are stale relative to commit 8e7b610: they say four new -mimalloc-suffixed Linux entries are added and "existing matrix entries default to OFF so they are unchanged", but the final diff instead flips USE_MIMALLOC/USE_EXTERNAL_MIMALLOC to ON on the existing release labels across Linux glibc/musl, macOS, Windows, FreeBSD, and Android — no -mimalloc labels exist. Looks intentional per the commit title; would just update the title/description so the scope is clear.

Extended reasoning...

What

The PR description says:

Adds four new Linux glibc matrix entries that build JSC with mimalloc … bun-webkit-linux-amd64-mimalloc, bun-webkit-linux-amd64-mimalloc-lto, bun-webkit-linux-arm64-mimalloc, bun-webkit-linux-arm64-mimalloc-lto
…
Wired through Dockerfile / release.sh as build args; existing matrix entries default to OFF so they are unchanged.

That accurately described the initial commit (1d65722), but the final commit on the branch — 8e7b610 "Enable USE_MIMALLOC/USE_EXTERNAL_MIMALLOC on all non-asan release targets" — replaced the additive approach with an in-place switch. In the final .github/workflows/build-reusable.yml there are no -mimalloc-suffixed labels; instead USE_MIMALLOC: "ON" / USE_EXTERNAL_MIMALLOC: "ON" are added to the existing labels: bun-webkit-linux-{amd64,arm64}[-lto][-baseline], all six -musl release entries, all four macos release/LTO entries, all five windows release/LTO/baseline entries, both freebsd release entries, and both android release entries. Debug and ASAN entries are the only ones left on the default (libpas).

Why the description no longer matches

  • The four -mimalloc labels named in the description do not appear anywhere in the workflow, the release job's download/rename steps, or the release-asset lists.
  • The sentence "existing matrix entries default to OFF so they are unchanged" is now false — every non-debug/non-asan existing label is changed to external-mimalloc.
  • The description scopes the change to "Linux glibc" and Dockerfile/release.sh, but the diff also touches Dockerfile.{musl,macos,windows,freebsd,android} and their wrapper scripts, and flips flags for those platforms in the matrix.

Step-by-step

  1. Read the PR title: "Add Linux mimalloc build matrix entries (amd64/arm64, release + LTO)" — implies 4 additive entries.
  2. Grep the final build-reusable.yml for mimalloc in a label: — no matches.
  3. Look at, e.g., the bun-webkit-linux-amd64 matrix entry (lines ~89-96): it now carries USE_MIMALLOC: "ON" and USE_EXTERNAL_MIMALLOC: "ON".
  4. Same for bun-webkit-macos-arm64, bun-webkit-windows-amd64, bun-webkit-freebsd-amd64, bun-webkit-linux-arm64-android, etc.
  5. Conclusion: the description describes an earlier revision; the actual scope is "switch every release artifact to external-mimalloc", not "add 4 new Linux variants".

Impact

This is a PR-metadata issue, not a code defect. The commit title (8e7b610) is explicit about the intent, artifacts publish under per-SHA autobuild-{sha} tags so older Bun builds pinning a specific SHA are unaffected, and the timeline shows Bun's CI has already exercised these builds. So there's no downstream breakage risk from the description being stale — the concern is purely that a reviewer approving from the title/description would underestimate the scope (an allocator/ABI change to every existing release label across 6 platforms rather than 4 additive Linux entries).

Fix

Update the PR title and description to reflect the final state, e.g. "Switch all non-debug/non-asan release artifacts to USE_MIMALLOC + USE_EXTERNAL_MIMALLOC", drop the list of -mimalloc labels, and remove/revise the "existing matrix entries default to OFF so they are unchanged" sentence. No code change needed.

- lto_flag: ""
label: bun-webkit-linux-arm64
os: linux-arm64-gh
package_json_arch: "arm64"
CMAKE_BUILD_TYPE: "Release"
RELEASE_FLAGS: "-O3 -DNDEBUG=1"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- lto_flag: "-flto=full -fwhole-program-vtables -fforce-emit-vtables"
label: bun-webkit-linux-amd64-lto
os: linux-x64-gh
package_json_arch: "x64"
CMAKE_BUILD_TYPE: "Release"
RELEASE_FLAGS: "-O3 -DNDEBUG=1"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- lto_flag: ""
label: bun-webkit-linux-amd64
os: linux-x64-gh
package_json_arch: "x64"
CMAKE_BUILD_TYPE: "Release"
RELEASE_FLAGS: "-O3 -DNDEBUG=1"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- lto_flag: "-flto=full -fwhole-program-vtables -fforce-emit-vtables"
label: bun-webkit-linux-amd64-baseline-lto
os: linux-x64-gh
package_json_arch: "x64"
CMAKE_BUILD_TYPE: "Release"
RELEASE_FLAGS: "-O3 -DNDEBUG=1"
MARCH_FLAG: "-march=nehalem"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- lto_flag: ""
label: bun-webkit-linux-amd64-baseline
os: linux-x64-gh
package_json_arch: "x64"
CMAKE_BUILD_TYPE: "Release"
RELEASE_FLAGS: "-O3 -DNDEBUG=1"
MARCH_FLAG: "-march=nehalem"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- lto_flag: ""
label: bun-webkit-linux-amd64-asan
os: linux-x64-gh
Expand Down Expand Up @@ -137,7 +149,7 @@ jobs:
else
export MARCH_FLAG="${{ matrix.MARCH_FLAG || '-march=haswell' }}"
fi
WEBKIT_RELEASE_TYPE=${{matrix.CMAKE_BUILD_TYPE}} CPU="native" cpu=native LTO_FLAG="${{matrix.lto_flag}}" temp=${{runner.temp}} ENABLE_SANITIZERS="${{matrix.ENABLE_SANITIZERS}}" bash release.sh
WEBKIT_RELEASE_TYPE=${{matrix.CMAKE_BUILD_TYPE}} CPU="native" cpu=native LTO_FLAG="${{matrix.lto_flag}}" temp=${{runner.temp}} ENABLE_SANITIZERS="${{matrix.ENABLE_SANITIZERS}}" USE_MIMALLOC="${{matrix.USE_MIMALLOC || 'OFF'}}" USE_EXTERNAL_MIMALLOC="${{matrix.USE_EXTERNAL_MIMALLOC || 'OFF'}}" bash release.sh
cd ${{runner.temp}}
echo "#define BUN_WEBKIT_VERSION \"${{ inputs.build_ref }}\"" >> bun-webkit/include/cmakeconfig.h
echo '{ "name": "${{matrix.label}}", "version": "0.0.1-${{ inputs.build_ref }}", "os": ["linux"], "cpu": ["${{matrix.package_json_arch}}"], "repository": "https://github.com/${{github.repository}}" }' > bun-webkit/package.json
Expand Down Expand Up @@ -168,6 +180,8 @@ jobs:
package_json_arch: "x64"
CMAKE_BUILD_TYPE: "Release"
lto_flag: ""
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- label: bun-webkit-windows-amd64-lto
win_arch: x64
package_json_arch: "x64"
Expand All @@ -183,6 +197,8 @@ jobs:
# LTO codegen aborts ("Associative COMDAT symbol '??_7...' does
# not exist").
lto_flag: "/clang:-flto=thin /clang:-fno-split-lto-unit"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- label: bun-webkit-windows-amd64-debug
win_arch: x64
package_json_arch: "x64"
Expand All @@ -194,6 +210,8 @@ jobs:
CMAKE_BUILD_TYPE: "Release"
lto_flag: ""
baseline: "true"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- label: bun-webkit-windows-amd64-baseline-lto
win_arch: x64
package_json_arch: "x64"
Expand All @@ -204,6 +222,8 @@ jobs:
# LTO too — matching bun-webkit-linux-amd64-baseline-lto.
lto_flag: "/clang:-flto=thin /clang:-fno-split-lto-unit"
baseline: "true"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
# ASAN is x64-only: LLVM ships no Windows ARM64 ASAN runtime. The
# sanitizer runtime (import lib, /MT runtime thunk, DLL) comes from
# the compiler-rt-windows-* release tag (see Dockerfile.windows).
Expand All @@ -218,6 +238,8 @@ jobs:
package_json_arch: "arm64"
CMAKE_BUILD_TYPE: "Release"
lto_flag: ""
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
# No arm64-lto variant: LLVM 21's CodeView emitter has no register
# mapping for ARM64 NEON quad-register tuples ("LLVM ERROR: unknown
# codeview register Q22_Q23_Q24_Q25") and the LTO codegen allocates
Expand All @@ -242,7 +264,7 @@ jobs:
- name: Run
run: |
rm -rf ${{runner.temp}}/bun-webkit ${{runner.temp}}/bun-webkit.tar.gz
WIN_ARCH="${{matrix.win_arch}}" WEBKIT_RELEASE_TYPE="${{matrix.CMAKE_BUILD_TYPE}}" LTO_FLAG="${{matrix.lto_flag}}" BASELINE="${{matrix.baseline}}" ENABLE_SANITIZERS="${{matrix.ENABLE_SANITIZERS}}" temp=${{runner.temp}} bash windows-cross-release.sh
WIN_ARCH="${{matrix.win_arch}}" WEBKIT_RELEASE_TYPE="${{matrix.CMAKE_BUILD_TYPE}}" LTO_FLAG="${{matrix.lto_flag}}" BASELINE="${{matrix.baseline}}" ENABLE_SANITIZERS="${{matrix.ENABLE_SANITIZERS}}" USE_MIMALLOC="${{matrix.USE_MIMALLOC || 'OFF'}}" USE_EXTERNAL_MIMALLOC="${{matrix.USE_EXTERNAL_MIMALLOC || 'OFF'}}" temp=${{runner.temp}} bash windows-cross-release.sh
cd ${{runner.temp}}
echo "#define BUN_WEBKIT_VERSION \"${{ inputs.build_ref }}\"" >> bun-webkit/include/cmakeconfig.h
echo '{ "name": "${{matrix.label}}", "version": "0.0.1-${{ inputs.build_ref }}", "os": ["windows"], "cpu": ["${{matrix.package_json_arch}}"], "repository": "https://github.com/${{github.repository}}" }' > bun-webkit/package.json
Expand Down Expand Up @@ -339,33 +361,45 @@ jobs:
os: linux-arm64-gh
package_json_arch: "arm64"
CMAKE_BUILD_TYPE: "MinSizeRel"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- lto_flag: ""
label: bun-webkit-linux-arm64-musl
os: linux-arm64-gh
package_json_arch: "arm64"
CMAKE_BUILD_TYPE: "MinSizeRel"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- lto_flag: "-flto=full -fwhole-program-vtables -fforce-emit-vtables"
label: bun-webkit-linux-amd64-musl-lto
os: linux-x64-gh
package_json_arch: "x64"
CMAKE_BUILD_TYPE: "MinSizeRel"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- lto_flag: ""
label: bun-webkit-linux-amd64-musl
os: linux-x64-gh
package_json_arch: "x64"
CMAKE_BUILD_TYPE: "MinSizeRel"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- lto_flag: "-flto=full -fwhole-program-vtables -fforce-emit-vtables"
label: bun-webkit-linux-amd64-musl-baseline-lto
os: linux-x64-gh
package_json_arch: "x64"
CMAKE_BUILD_TYPE: "MinSizeRel"
MARCH_FLAG: "-march=nehalem"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- lto_flag: ""
label: bun-webkit-linux-amd64-musl-baseline
os: linux-x64-gh
package_json_arch: "x64"
CMAKE_BUILD_TYPE: "MinSizeRel"
MARCH_FLAG: "-march=nehalem"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
timeout-minutes: 90
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
Expand All @@ -388,7 +422,7 @@ jobs:
else
export MARCH_FLAG="${{ matrix.MARCH_FLAG || '-march=haswell' }}"
fi
WEBKIT_RELEASE_TYPE=${{matrix.CMAKE_BUILD_TYPE}} CPU="native" cpu=native LTO_FLAG="${{matrix.lto_flag}}" temp=${{runner.temp}} bash musl-release.sh
WEBKIT_RELEASE_TYPE=${{matrix.CMAKE_BUILD_TYPE}} CPU="native" cpu=native LTO_FLAG="${{matrix.lto_flag}}" USE_MIMALLOC="${{matrix.USE_MIMALLOC || 'OFF'}}" USE_EXTERNAL_MIMALLOC="${{matrix.USE_EXTERNAL_MIMALLOC || 'OFF'}}" temp=${{runner.temp}} bash musl-release.sh
cd ${{runner.temp}}
echo "#define BUN_WEBKIT_VERSION \"${{ inputs.build_ref }}\"" >> bun-webkit/include/cmakeconfig.h
echo '{ "name": "${{matrix.label}}", "version": "0.0.1-${{ inputs.build_ref }}", "os": ["linux"], "cpu": ["${{matrix.package_json_arch}}"], "repository": "https://github.com/${{github.repository}}" }' > bun-webkit/package.json
Expand Down Expand Up @@ -418,11 +452,15 @@ jobs:
package_json_arch: "arm64"
CMAKE_BUILD_TYPE: "Release"
lto_flag: ""
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- label: bun-webkit-macos-arm64-lto
macos_arch: arm64
package_json_arch: "arm64"
CMAKE_BUILD_TYPE: "Release"
lto_flag: "-flto=thin -fno-split-lto-unit -fwhole-program-vtables -fforce-emit-vtables"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- label: bun-webkit-macos-arm64-debug
macos_arch: arm64
package_json_arch: "arm64"
Expand All @@ -434,11 +472,15 @@ jobs:
package_json_arch: "x64"
CMAKE_BUILD_TYPE: "Release"
lto_flag: ""
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- label: bun-webkit-macos-amd64-lto
macos_arch: x86_64
package_json_arch: "x64"
CMAKE_BUILD_TYPE: "Release"
lto_flag: "-flto=thin -fno-split-lto-unit -fwhole-program-vtables -fforce-emit-vtables"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- label: bun-webkit-macos-amd64-debug
macos_arch: x86_64
package_json_arch: "x64"
Expand Down Expand Up @@ -480,7 +522,7 @@ jobs:
- name: Run
run: |
rm -rf ${{runner.temp}}/bun-webkit ${{runner.temp}}/bun-webkit.tar.gz
MACOS_ARCH="${{matrix.macos_arch}}" WEBKIT_RELEASE_TYPE="${{matrix.CMAKE_BUILD_TYPE}}" LTO_FLAG="${{matrix.lto_flag}}" CPP_FLAGS="${{matrix.cpp_flags}}" ENABLE_SANITIZERS="${{matrix.ENABLE_SANITIZERS}}" ENABLE_MALLOC_HEAP_BREAKDOWN="${{matrix.ENABLE_MALLOC_HEAP_BREAKDOWN}}" temp=${{runner.temp}} bash macos-cross-release.sh
MACOS_ARCH="${{matrix.macos_arch}}" WEBKIT_RELEASE_TYPE="${{matrix.CMAKE_BUILD_TYPE}}" LTO_FLAG="${{matrix.lto_flag}}" CPP_FLAGS="${{matrix.cpp_flags}}" ENABLE_SANITIZERS="${{matrix.ENABLE_SANITIZERS}}" ENABLE_MALLOC_HEAP_BREAKDOWN="${{matrix.ENABLE_MALLOC_HEAP_BREAKDOWN}}" USE_MIMALLOC="${{matrix.USE_MIMALLOC || 'OFF'}}" USE_EXTERNAL_MIMALLOC="${{matrix.USE_EXTERNAL_MIMALLOC || 'OFF'}}" temp=${{runner.temp}} bash macos-cross-release.sh
cd ${{runner.temp}}
echo "#define BUN_WEBKIT_VERSION \"${{ inputs.build_ref }}\"" >> bun-webkit/include/cmakeconfig.h
echo '{ "name": "${{matrix.label}}", "version": "0.0.1-${{ inputs.build_ref }}", "os": ["darwin"], "cpu": ["${{matrix.package_json_arch}}"], "repository": "https://github.com/${{github.repository}}" }' > bun-webkit/package.json
Expand All @@ -503,6 +545,8 @@ jobs:
freebsd_arch: x86_64
package_json_arch: "x64"
CMAKE_BUILD_TYPE: "Release"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- label: bun-webkit-freebsd-amd64-debug
freebsd_arch: x86_64
package_json_arch: "x64"
Expand All @@ -511,6 +555,8 @@ jobs:
freebsd_arch: aarch64
package_json_arch: "arm64"
CMAKE_BUILD_TYPE: "Release"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- label: bun-webkit-freebsd-arm64-debug
freebsd_arch: aarch64
package_json_arch: "arm64"
Expand All @@ -532,7 +578,7 @@ jobs:
- name: Run
run: |
rm -rf ${{runner.temp}}/bun-webkit ${{runner.temp}}/bun-webkit.tar.gz
FREEBSD_ARCH="${{matrix.freebsd_arch}}" WEBKIT_RELEASE_TYPE="${{matrix.CMAKE_BUILD_TYPE}}" temp=${{runner.temp}} bash freebsd-release.sh
FREEBSD_ARCH="${{matrix.freebsd_arch}}" WEBKIT_RELEASE_TYPE="${{matrix.CMAKE_BUILD_TYPE}}" USE_MIMALLOC="${{matrix.USE_MIMALLOC || 'OFF'}}" USE_EXTERNAL_MIMALLOC="${{matrix.USE_EXTERNAL_MIMALLOC || 'OFF'}}" temp=${{runner.temp}} bash freebsd-release.sh
cd ${{runner.temp}}
echo "#define BUN_WEBKIT_VERSION \"${{ inputs.build_ref }}\"" >> bun-webkit/include/cmakeconfig.h
echo '{ "name": "${{matrix.label}}", "version": "0.0.1-${{ inputs.build_ref }}", "os": ["freebsd"], "cpu": ["${{matrix.package_json_arch}}"], "repository": "https://github.com/${{github.repository}}" }' > bun-webkit/package.json
Expand All @@ -556,6 +602,8 @@ jobs:
android_arch: aarch64
package_json_arch: "arm64"
CMAKE_BUILD_TYPE: "Release"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- label: bun-webkit-linux-arm64-android-debug
android_arch: aarch64
package_json_arch: "arm64"
Expand All @@ -564,6 +612,8 @@ jobs:
android_arch: x86_64
package_json_arch: "x64"
CMAKE_BUILD_TYPE: "Release"
USE_MIMALLOC: "ON"
USE_EXTERNAL_MIMALLOC: "ON"
- label: bun-webkit-linux-amd64-android-debug
android_arch: x86_64
package_json_arch: "x64"
Expand All @@ -585,7 +635,7 @@ jobs:
- name: Run
run: |
rm -rf ${{runner.temp}}/bun-webkit ${{runner.temp}}/bun-webkit.tar.gz
ANDROID_ARCH="${{matrix.android_arch}}" WEBKIT_RELEASE_TYPE="${{matrix.CMAKE_BUILD_TYPE}}" temp=${{runner.temp}} bash android-release.sh
ANDROID_ARCH="${{matrix.android_arch}}" WEBKIT_RELEASE_TYPE="${{matrix.CMAKE_BUILD_TYPE}}" USE_MIMALLOC="${{matrix.USE_MIMALLOC || 'OFF'}}" USE_EXTERNAL_MIMALLOC="${{matrix.USE_EXTERNAL_MIMALLOC || 'OFF'}}" temp=${{runner.temp}} bash android-release.sh
cd ${{runner.temp}}
echo "#define BUN_WEBKIT_VERSION \"${{ inputs.build_ref }}\"" >> bun-webkit/include/cmakeconfig.h
echo '{ "name": "${{matrix.label}}", "version": "0.0.1-${{ inputs.build_ref }}", "os": ["android"], "cpu": ["${{matrix.package_json_arch}}"], "repository": "https://github.com/${{github.repository}}" }' > bun-webkit/package.json
Expand Down
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ ARG RELEASE_FLAGS="-O3 -DNDEBUG=1"
ARG LLVM_VERSION="21"
ARG DEFAULT_CFLAGS="-mno-omit-leaf-frame-pointer -g -fno-omit-frame-pointer -ffunction-sections -fdata-sections -faddrsig -fno-unwind-tables -fno-asynchronous-unwind-tables -DU_STATIC_IMPLEMENTATION=1 "
ARG ENABLE_SANITIZERS=""
ARG USE_MIMALLOC="OFF"
ARG USE_EXTERNAL_MIMALLOC="OFF"

# Use different base images for ARM64 vs x86_64
FROM --platform=$BUILDPLATFORM ubuntu:20.04 as base-arm64
Expand All @@ -21,6 +23,8 @@ ARG LLVM_VERSION
ARG DEFAULT_CFLAGS
ARG TARGETARCH
ARG ENABLE_SANITIZERS
ARG USE_MIMALLOC
ARG USE_EXTERNAL_MIMALLOC

# Prevent interactive prompts
ENV DEBIAN_FRONTEND=noninteractive
Expand Down Expand Up @@ -249,7 +253,11 @@ ENV CPU=${CPU}
ENV MARCH_FLAG=${MARCH_FLAG}
ENV RELEASE_FLAGS=${RELEASE_FLAGS}

# clang searches C_INCLUDE_PATH (gcc-13's builtin-header dir) before its own
# resource dir, so C TUs including <immintrin.h> (mimalloc static.c, -march=haswell)
# pick up gcc's incompatible copy. clang ships its own; drop it for this step.
RUN --mount=type=tmpfs,target=/webkitbuild \
unset C_INCLUDE_PATH && \
export CFLAGS="$CFLAGS $LTO_FLAG -ffile-prefix-map=/webkit/Source=vendor/WebKit/Source -ffile-prefix-map=/webkitbuild/=. " && \
export CXXFLAGS="$CXXFLAGS $LTO_FLAG -fno-c++-static-destructors -ffile-prefix-map=/webkit/Source=vendor/WebKit/Source -ffile-prefix-map=/webkitbuild/=. " && \
export ENABLE_ASSERTS="AUTO" && \
Expand Down Expand Up @@ -280,6 +288,8 @@ RUN --mount=type=tmpfs,target=/webkitbuild \
-DICU_ROOT=/icu \
-DENABLE_SANITIZERS="$ENABLE_SANITIZERS" \
-DENABLE_ASSERTS="$ENABLE_ASSERTS" \
-DUSE_MIMALLOC="$USE_MIMALLOC" \
-DUSE_EXTERNAL_MIMALLOC="$USE_EXTERNAL_MIMALLOC" \
-G Ninja \
/webkit && \
cd /webkitbuild && \
Expand Down
6 changes: 6 additions & 0 deletions Dockerfile.android
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ ARG NDK_SHA256="59c2f6dc96743b5daf5d1626684640b20a6bd2b1d85b13156b90333741bad5cc
ARG ANDROID_API="28"
ARG ANDROID_ARCH="aarch64"
ARG DEFAULT_CFLAGS="-mno-omit-leaf-frame-pointer -g -fno-omit-frame-pointer -ffunction-sections -fdata-sections -faddrsig -fno-unwind-tables -fno-asynchronous-unwind-tables -DU_STATIC_IMPLEMENTATION=1 "
ARG USE_MIMALLOC="OFF"
ARG USE_EXTERNAL_MIMALLOC="OFF"
ARG ICU_VERSION="75_1"
ARG ICU_RELEASE_TAG="release-75-1"
ARG ICU_SHA256="cb968df3e4d2e87e8b11c49a5d01c787bd13b9545280fc6642f826527618caef"
Expand Down Expand Up @@ -141,6 +143,8 @@ ARG LTO_FLAG
ARG DEFAULT_CFLAGS
ARG ANDROID_API
ARG ANDROID_ARCH
ARG USE_MIMALLOC
ARG USE_EXTERNAL_MIMALLOC

COPY . /webkit
WORKDIR /webkit
Expand Down Expand Up @@ -175,6 +179,8 @@ RUN --mount=type=tmpfs,target=/webkitbuild \
-DUSE_THIN_ARCHIVES=OFF \
-DUSE_BUN_JSC_ADDITIONS=ON \
-DUSE_BUN_EVENT_LOOP=ON \
-DUSE_MIMALLOC="$USE_MIMALLOC" \
-DUSE_EXTERNAL_MIMALLOC="$USE_EXTERNAL_MIMALLOC" \
-DENABLE_FTL_JIT=ON \
-DENABLE_API_TESTS=OFF \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
Expand Down
6 changes: 6 additions & 0 deletions Dockerfile.freebsd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ ARG LLVM_VERSION="21"
ARG FREEBSD_VERSION="14.3"
ARG FREEBSD_ARCH="x86_64"
ARG DEFAULT_CFLAGS="-mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -ffunction-sections -fdata-sections -faddrsig -fno-unwind-tables -fno-asynchronous-unwind-tables -DU_STATIC_IMPLEMENTATION=1 "
ARG USE_MIMALLOC="OFF"
ARG USE_EXTERNAL_MIMALLOC="OFF"
# -g is added per-stage below for Debug only — with -O3 + tmpfs, debug info
# OOMs the linux-x64-gh runner during Release builds (not seen on Android,
# but FreeBSD's libc++ headers generate notably more DWARF).
Expand Down Expand Up @@ -131,6 +133,8 @@ ARG LTO_FLAG
ARG DEFAULT_CFLAGS
ARG FREEBSD_VERSION
ARG FREEBSD_ARCH
ARG USE_MIMALLOC
ARG USE_EXTERNAL_MIMALLOC

COPY . /webkit
WORKDIR /webkit
Expand Down Expand Up @@ -161,6 +165,8 @@ RUN --mount=type=tmpfs,target=/webkitbuild \
-DUSE_THIN_ARCHIVES=OFF \
-DUSE_BUN_JSC_ADDITIONS=ON \
-DUSE_BUN_EVENT_LOOP=ON \
-DUSE_MIMALLOC="$USE_MIMALLOC" \
-DUSE_EXTERNAL_MIMALLOC="$USE_EXTERNAL_MIMALLOC" \
-DENABLE_FTL_JIT=ON \
-DENABLE_API_TESTS=OFF \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
Expand Down
6 changes: 6 additions & 0 deletions Dockerfile.macos
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ ARG ENABLE_MALLOC_HEAP_BREAKDOWN="OFF"
# official LLVM macOS release is arm64-only), so x86_64 ASAN variants would
# fail to link.
ARG ENABLE_SANITIZERS=""
ARG USE_MIMALLOC="OFF"
ARG USE_EXTERNAL_MIMALLOC="OFF"
ARG COMPILER_RT_DARWIN_TAG="compiler-rt-darwin-21.1.8"
ARG COMPILER_RT_DARWIN_SHA256="f9bab8191d63873682ec69492d06cfdf0807a7335c4e9b188ef013b3cc3c9dbc"

Expand Down Expand Up @@ -164,6 +166,8 @@ ARG DEFAULT_CFLAGS
ARG CPP_FLAGS
ARG ENABLE_MALLOC_HEAP_BREAKDOWN
ARG ENABLE_SANITIZERS
ARG USE_MIMALLOC
ARG USE_EXTERNAL_MIMALLOC

COPY --from=build_mig /usr/local/bin/mig /usr/local/bin/migcom /usr/local/bin/
COPY . /webkit
Expand Down Expand Up @@ -201,6 +205,8 @@ RUN --mount=type=tmpfs,target=/webkitbuild \
-DUSE_THIN_ARCHIVES=OFF \
-DUSE_BUN_JSC_ADDITIONS=ON \
-DUSE_BUN_EVENT_LOOP=ON \
-DUSE_MIMALLOC="$USE_MIMALLOC" \
-DUSE_EXTERNAL_MIMALLOC="$USE_EXTERNAL_MIMALLOC" \
-DENABLE_FTL_JIT=ON \
-DENABLE_API_TESTS=OFF \
-DENABLE_MALLOC_HEAP_BREAKDOWN=${ENABLE_MALLOC_HEAP_BREAKDOWN} \
Expand Down
Loading
Loading