CompileStep.emit_h setting puts headers in unexpected directory for zig build
#15156
Labels
bug
Observed behavior contradicts documented or intended behavior
zig build system
std.Build, the build runner, `zig build` subcommand, package management
Milestone
Zig Version
0.11.0-dev.2336+5b82b4004
Steps to Reproduce and Observed Behavior
When creating a static library with
zig build
, addingemit_h
to the CompileStep results in the header being output to the CWD, not the cache directory. This causes theinstall
step to fail because although it knows that it needs to copy a header file, it tries to look in the cache directory and blows up with aFileNotFound
.Here is what I put in my build.zig file:
...and this is the output:
It appears that
-emit-h
could in theory take a path parameter, but none is being passed.Expected Behavior
No error, header file is installed to the
zig-out
directory.The text was updated successfully, but these errors were encountered: