Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow external zig in CMake #17159

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

RossComputerGuy
Copy link

What does this PR do?

Adds the ability to override the Zig command in use. This is useful for testing patches or odd systems like Asahi which rely on hacks or switching out to a locally built Zig.

  • Documentation or TypeScript types (it's okay to leave the rest blank in this case)
  • Code changes

How did you verify your code works?

Configure cmake and set -DZIG_EXECUTABLE. Grep for --zig-lib-dir and saw the same path as zig env | jq .lib_dir says.

Example:

$ grep -r '\--zig-lib-dir'
CMakeFiles/bun-zig.dir/build.make:	cd /home/ross/bun-workspace/bun && /nix/store/kbi2k2h2q395ip75iq0zfra7p14cz0wx-zig-0.14.0-git+f70ec2f/bin/zig build obj --cache-dir /home/ross/bun-workspace/bun/build/cache/zig/local --global-cache-dir /home/ross/bun-workspace/bun/build/cache/zig/global --zig-lib-dir /nix/store/kbi2k2h2q395ip75iq0zfra7p14cz0wx-zig-0.14.0-git+f70ec2f/lib/zig --prefix /home/ross/bun-workspace/bun/build -Dobj_format=obj -Dtarget=aarch64-linux-gnu -Doptimize=ReleaseFast -Dcpu=native -Denable_logs=false -Dversion=1.2.3 -Dreported_nodejs_version=22.6.0 -Dcanary=1 -Dcodegen_path=/home/ross/bun-workspace/bun/build/codegen -Dcodegen_embed=true -Denable_asan=false --prominent-compile-errors -Dsha=9fd96c1be33fb612c7bc11ffb7cea565e868f879

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant