diff --git a/tools/RELEASING.md b/tools/RELEASING.md index 59a18f8..0b76140 100644 --- a/tools/RELEASING.md +++ b/tools/RELEASING.md @@ -11,16 +11,26 @@ it lives in the appendix at the bottom. `tools/release.sh --cross` adds, next to the host (Apple Silicon) pair: `x86_64-apple-darwin` (Intel Mac), `x86_64-unknown-linux-musl` (any x86-64 Linux — statically linked, no glibc dependency) and `x86_64-pc-windows-gnu` -(`.exe`, depends only on DLLs Windows 10+ ships). The `.vsix` is +(`.exe`, depends only on DLLs Windows 10+ ships) and +`x86_64-unknown-linux-gnu` — the glibc-linked build for enterprise +distributions: the messense toolchain's sysroot keeps the highest +referenced symbol at `GLIBC_2.28`, which is RHEL 8's own glibc, so it +runs on RHEL 8.x (verified for 8.10 by symbol audit: +`x86_64-unknown-linux-gnu-objdump -T dist/vfmt-server-* | grep -o +'GLIBC_[0-9.]*' | sort -Vu | tail -1`; every NEEDED library is in a base +install). The static musl build runs there too — the gnu build exists +for shops that require a native glibc link. The `.vsix` is platform-independent JavaScript; only the binaries are per-platform. One-time setup on the build Mac (2026-08-25, all via Homebrew): ```bash brew install rustup mingw-w64 +brew install messense/macos-cross-toolchains/x86_64-unknown-linux-gnu /opt/homebrew/opt/rustup/bin/rustup toolchain install stable --profile minimal /opt/homebrew/opt/rustup/bin/rustup target add --toolchain stable \ - x86_64-apple-darwin x86_64-unknown-linux-musl x86_64-pc-windows-gnu + x86_64-apple-darwin x86_64-unknown-linux-musl x86_64-unknown-linux-gnu \ + x86_64-pc-windows-gnu ``` Notes the script encodes so nobody rediscovers them: the Homebrew *rust* diff --git a/tools/release.sh b/tools/release.sh index d0bc968..8e92707 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -76,6 +76,14 @@ if [ "$want_cross" -eq 1 ]; then cross_build x86_64-unknown-linux-musl \ DYLD_FALLBACK_LIBRARY_PATH="$tc/lib" \ CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=rust-lld + if command -v x86_64-unknown-linux-gnu-gcc >/dev/null 2>&1; then + cross_build x86_64-unknown-linux-gnu \ + CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=x86_64-unknown-linux-gnu-gcc + else + echo "error: --cross needs the linux-gnu toolchain for the RHEL-compatible build" >&2 + echo " (brew install messense/macos-cross-toolchains/x86_64-unknown-linux-gnu)" >&2 + exit 2 + fi if command -v x86_64-w64-mingw32-gcc >/dev/null 2>&1; then cross_build x86_64-pc-windows-gnu \ CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=x86_64-w64-mingw32-gcc @@ -83,7 +91,7 @@ if [ "$want_cross" -eq 1 ]; then echo "error: --cross needs mingw-w64 for the Windows build (brew install mingw-w64)" >&2 exit 2 fi - for triple in x86_64-apple-darwin x86_64-unknown-linux-musl x86_64-pc-windows-gnu; do + for triple in x86_64-apple-darwin x86_64-unknown-linux-musl x86_64-unknown-linux-gnu x86_64-pc-windows-gnu; do case $triple in *windows*) exe=.exe ;; *) exe="" ;; esac cp "$repo_root/target/$triple/release/vfmt$exe" "$dist/vfmt-$version-$triple$exe" cp "$repo_root/target/$triple/release/vfmt-server$exe" "$dist/vfmt-server-$version-$triple$exe"