0
Fork 0
mirror of https://github.com/oven-sh/zig.git synced 2026-11-17 08:40:47 +00:00
No description https://ziglang.org
  • Zig 97.7%
  • C 1.3%
  • C++ 0.6%
  • Python 0.1%
Find a file
root 597cbfe43b psema: split claimOrWait .recursed/.cycle; resolveNavType seqlock; nav_map+OptBisect races; hoist FuncInstance prep out of 4-shard lock
claimOrWait now distinguishes same-thread reentry (.recursed -> dependency
loop diagnostic) from cross-thread cycle (.cycle -> yield-and-requeue);
the previous bare AnalysisFail silently markTransitiveFailed both units
with no error and could surface as a processExportsInner unreachable.
resolveNavType brackets type/linksection writes with bits.writing so
getNav cannot tear (mirrors resolveNavValue). ensureExportFuncQueued
locks the shard mutex around nav_map.contains. ensureNavValAnalysisQueued
unlocks nav_queued_mutex before queueJob so it doesn't nest under
work_queue_mutex. getFuncInstanceIes precomputes the instance nav's
name/fqn/mods before lockShardsSorted so the 4-shard critical section
holds only createNav+owner_nav write. OptBisect is per-thread.
History 2026-04-26 13:14:09 +00:00
.github ci: gate mimalloc splice to linux-musl targets only 2026-04-26 13:14:09 +00:00
ci Revert "ci: target baseline instead of spacemit_x60 on riscv64-linux" 2025-08-03 22:40:13 +02:00
cmake Add lld path of linuxbrew installation (#23466) 2025-04-06 06:25:39 +00:00
doc Release 0.15.2 2025-10-10 20:45:47 -07:00
lib std.Build.Step.Compile: add getEmittedBinShards() 2026-04-26 13:14:09 +00:00
src psema: split claimOrWait .recursed/.cycle; resolveNavType seqlock; nav_map+OptBisect races; hoist FuncInstance prep out of 4-shard lock 2026-04-26 13:14:09 +00:00
stage1 Update wasm2c.c 2025-07-25 02:10:09 -07:00
test test/behavior/cast: check error-set membership not @typeInfo order 2026-04-26 13:14:09 +00:00
tools Rewrite generate_linux_syscalls to be completely table based 2025-08-14 10:19:31 +10:00
.gitattributes .gitattributes: Mark abilists files as binary. 2025-05-16 21:56:03 +02:00
.gitignore shard sema and codegen across N llvm modules 2026-04-26 13:14:08 +00:00
.mailmap update .mailmap 2025-03-03 17:19:09 -08:00
bootstrap.c bootstrap: Add support for DragonFly 2025-09-28 08:18:37 +02:00
build.zig build: link mimalloc into the compiler; -Dmimalloc-obj option 2026-04-26 13:14:09 +00:00
build.zig.zon rename "nonce" to "fingerprint" 2025-02-26 11:42:04 -08:00
CMakeLists.txt our patches 2025-10-14 14:10:40 -07:00
LICENSE LICENSE: copyright notices do not need years 2023-07-23 15:46:06 -07:00
README.md our patches 2025-10-14 14:10:40 -07:00

Bun's fork of zig

Upgrade info:

Process:

git fetch upstream
git fetch upstream --tags
git checkout 014-dev
git checkout -b upgrade-0.15.1
git reset --soft 0.14.1
git commit -m "our 0.14.1 patches"
git config --global merge.conflictstyle zdiff3
git rev-parse HEAD # COMMIT_ID
git reset --hard 0.15.1
git cherry-pick COMMIT_ID 
# to show the diff, `git diff 0.14.1 014-dev`
# alternatively, the changes can be made into a patch file and manually applied

if some parts fail (ie the file was renamed), remove them from the patch and apply them manually

resolve merge conflicts

  • Current is the new zig version
  • Base is the merge base
  • Incoming is our patch

commit

Building a Release build locally:

mkdir build
cd build
cmake .. -DZIG_STATIC_LLVM=ON -DZIG_STATIC_ZSTD=ON -DCMAKE_PREFIX_PATH="$(brew --prefix llvm@20);$(brew --prefix lld@20);$(brew --prefix zstd)" -DCMAKE_BUILD_TYPE=Release -GNinja -DZIG_NO_LIB=ON
ninja install

Building zig only given stage3

stage3/bin/zig build -p stage4 -Denable-llvm -Dno-lib

Updating CI:

  • If there was an llvm upgrade, need to upgrade zig-bootstrap ref and check that the sed commands will still work
  • Update zls
  • zls will silently be missing if the build fails in CI so test the build locally
  • search for /tsan|sanitize_thread/g. make sure every instance has the equivalent version for asan below it