mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-05-21 16:41:56 +03:00
zig cc: emit to a.out if outpath is unspecified
If `-o` is not specified for `zig cc` for linking, it should emit the
`a.out` (or equivalent) to the current directory. So then this:
$ zig cc test.c
Should result in `./a.out`.
If directory is omitted from `Compilation.EmitLoc`, it will default to
the cache directory later in the compilation chain, which will result
in `a.out` missing in the current directory.
If we specify the directory to `Compilation.EmitLoc`, it will be
handled, allegedly, correctly.
Fixes #12858
This commit is contained in:
committed by
Andrew Kelley
parent
e42f83825f
commit
4521456f66
+1
-1
@@ -2613,7 +2613,7 @@ fn buildOutputType(
|
||||
}
|
||||
},
|
||||
.yes_a_out => Compilation.EmitLoc{
|
||||
.directory = null,
|
||||
.directory = .{ .path = null, .handle = fs.cwd() },
|
||||
.basename = a_out_basename,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user