mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
## Summary - Update LLVM version references across build scripts, Dockerfiles, CI, Nix configs, and documentation - Fix LLVM 21 `-Wcharacter-conversion` errors in WebKit bindings: - `EncodingTables.h`: pragma for intentional char32_t/char16_t comparisons - `TextCodecCJK.cpp`: widen `gb18030AsymmetricEncode` param to char32_t - `URLPatternParser`: widen `isValidNameCodepoint` param to char32_t, cast for `startsWith` - Fix `__libcpp_verbose_abort` noexcept mismatch (LLVM 21 uses `_NOEXCEPT`) - Fix dangling pointer in `BunJSCModule.h` (`toCString` temporary lifetime) - Remove `useMathSumPreciseMethod` (removed upstream in JSC) **Before merging:** Merge https://github.com/oven-sh/WebKit/pull/153 first, then update `WEBKIT_VERSION` in `cmake/tools/SetupWebKit.cmake` to point to the merged commit. ## Test plan - [ ] Build bun debug on macOS with LLVM 21 - [ ] Build bun on Linux (glibc) - [ ] Build bun on Linux (musl) - [ ] Build bun on Windows - [ ] Run test suite Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
104 lines
2.3 KiB
Nix
104 lines
2.3 KiB
Nix
# Simple shell.nix for users without flakes enabled
|
|
# For reproducible builds with locked dependencies, use: nix develop
|
|
# This uses unpinned <nixpkgs> for simplicity; flake.nix provides version pinning via flake.lock
|
|
{ pkgs ? import <nixpkgs> {} }:
|
|
|
|
pkgs.mkShell rec {
|
|
packages = with pkgs; [
|
|
# Core build tools (matching bootstrap.sh)
|
|
cmake
|
|
ninja
|
|
clang_21
|
|
llvm_21
|
|
lld_21
|
|
nodejs_24
|
|
bun
|
|
rustc
|
|
cargo
|
|
go
|
|
python3
|
|
ccache
|
|
pkg-config
|
|
gnumake
|
|
libtool
|
|
ruby
|
|
perl
|
|
|
|
# Libraries
|
|
openssl
|
|
zlib
|
|
libxml2
|
|
|
|
# Development tools
|
|
git
|
|
curl
|
|
wget
|
|
unzip
|
|
xz
|
|
|
|
# Linux-specific: gdb and Chromium deps for testing
|
|
] ++ pkgs.lib.optionals pkgs.stdenv.isLinux [
|
|
gdb
|
|
# Chromium dependencies for Puppeteer tests
|
|
xorg.libX11
|
|
xorg.libxcb
|
|
xorg.libXcomposite
|
|
xorg.libXcursor
|
|
xorg.libXdamage
|
|
xorg.libXext
|
|
xorg.libXfixes
|
|
xorg.libXi
|
|
xorg.libXrandr
|
|
xorg.libXrender
|
|
xorg.libXScrnSaver
|
|
xorg.libXtst
|
|
libxkbcommon
|
|
mesa
|
|
nspr
|
|
nss
|
|
cups
|
|
dbus
|
|
expat
|
|
fontconfig
|
|
freetype
|
|
glib
|
|
gtk3
|
|
pango
|
|
cairo
|
|
alsa-lib
|
|
at-spi2-atk
|
|
at-spi2-core
|
|
libgbm
|
|
liberation_ttf
|
|
atk
|
|
libdrm
|
|
xorg.libxshmfence
|
|
gdk-pixbuf
|
|
];
|
|
|
|
shellHook = ''
|
|
export CC="${pkgs.lib.getExe pkgs.clang_21}"
|
|
export CXX="${pkgs.lib.getExe' pkgs.clang_21 "clang++"}"
|
|
export AR="${pkgs.llvm_21}/bin/llvm-ar"
|
|
export RANLIB="${pkgs.llvm_21}/bin/llvm-ranlib"
|
|
export CMAKE_C_COMPILER="$CC"
|
|
export CMAKE_CXX_COMPILER="$CXX"
|
|
export CMAKE_AR="$AR"
|
|
export CMAKE_RANLIB="$RANLIB"
|
|
export CMAKE_SYSTEM_PROCESSOR=$(uname -m)
|
|
export TMPDIR=''${TMPDIR:-/tmp}
|
|
'' + pkgs.lib.optionalString pkgs.stdenv.isLinux ''
|
|
export LD="${pkgs.lib.getExe' pkgs.lld_21 "ld.lld"}"
|
|
export NIX_CFLAGS_LINK="''${NIX_CFLAGS_LINK:+$NIX_CFLAGS_LINK }-fuse-ld=lld"
|
|
export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath packages}''${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
|
'' + ''
|
|
|
|
echo "====================================="
|
|
echo "Bun Development Environment (Nix)"
|
|
echo "====================================="
|
|
echo "To build: bun bd"
|
|
echo "To test: bun bd test <test-file>"
|
|
echo "====================================="
|
|
'';
|
|
}
|