Repository navigation
fix(cc): preprocessor doesn't emit bin - #20740
Merged
Merged
Conversation
zhylmzr
force-pushed
the
master
branch
2 times, most recently
from
July 22, 2024 17:54
a48afe0 to
cc9d19b
Compare
dasimmet
approved these changes
Jul 23, 2024
alexrp
approved these changes
Aug 9, 2024
Contributor
|
Can we get this merged, please? |
Vexu
approved these changes
Aug 26, 2024
Vexu
approved these changes
Aug 27, 2024
| .link => { | ||
| create_module.opts.output_mode = if (is_shared_lib) .Lib else .Exe; | ||
| emit_bin = if (out_path) |p| .{ .yes = p } else EmitBin.yes_a_out; | ||
| emit_bin = if (out_path) |p| .{ .yes = p } else emit_bin; |
Member
There was a problem hiding this comment.
yes_a_out looks unused after this and could be deleted.
Member
There was a problem hiding this comment.
Ah I was on the wrong branch and was getting the old behavior.
Why was this changed?
andrewrk
requested changes
Aug 27, 2024
andrewrk
left a comment
Member
There was a problem hiding this comment.
Causes the following regression:
andy@bark ~/tmp> ~/src/zig/build-noassert/stage4/bin/zig cc hello.c
andy@bark ~/tmp> ./a.out
./a.out: command not found
Please test before sending patches.
Contributor
Author
|
fixed, sorry for missing this test case. |
Contributor
Author
|
Is there any update on the progress? |
zhylmzr
force-pushed
the
master
branch
2 times, most recently
from
January 22, 2025 02:35
a0f3d8e to
da9348c
Compare
clang's behavior. 1. `zig cc main.c -o /dev/null` shouldn't emit a.out 2. `zig cc -E main.c` and `zig cc -E main -o -` should output to stdout
alexrp
approved these changes
Jan 26, 2025
alexrp
enabled auto-merge (rebase)
January 26, 2025 23:01
oalders
added a commit
to oalders/clodhopper
that referenced
this pull request
Jun 1, 2026
* ci: bump zig to 0.14.1 to fix darwin CGO cross-compile zig 0.13.0 fails cross-compiling go-sqlite3 (CGO) to macOS targets with "unable to create compilation: AccessDenied" (ziglang/zig#20689). The fix (ziglang/zig#20740) shipped in zig 0.14.0, so pin to 0.14.1. Co-Authored-By: Claude Opus 4.8 <[email protected]> * ci: bump mlugg/setup-zig to v2 setup-zig@v1 cannot resolve zig 0.14.1 (404 on the download index). v2 handles current ziglang.org/community-mirror version resolution. Co-Authored-By: Claude Opus 4.8 <[email protected]> * ci: build darwin with clang+SDK on a macOS runner zig cannot link macOS CGO binaries: Apple's SDK isn't redistributable, so zig's bundled macos libc lacks libresolv and the system frameworks that Go's net package and go-sqlite3 require ("unable to find dynamic system library 'resolv'"). Move the release job to macos-latest and build darwin natively with clang against the runner's SDK (resolved via xcrun --show-sdk-path, passed as SDK_PATH). linux and windows still cross-compile with zig from the same runner. Co-Authored-By: Claude Opus 4.8 <[email protected]> --------- Co-authored-by: Claude Opus 4.8 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
zig cc main.c -o /dev/nullemita.out,zig cc -E main.cemitmain.o, this pr modifies the linking and preprocessing generation logic to be more consistent with clang's behavior.When using
clang -E main.corclang -E main.c -o -outputs directly to standard output, if usingclang -E main.c -o ait outputs to a file.Fix the following issues:
fixed: #20739
fixed: #20689
fixed: #20359
fixed: #20709