-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
putting slash in object name causes build failure #2450
Copy link
Copy link
Open
Labels
contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.zig build systemstd.Build, the build runner, `zig build` subcommand, package managementstd.Build, the build runner, `zig build` subcommand, package management
Milestone
Metadata
Metadata
Assignees
Labels
contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.standard libraryThis issue involves writing Zig code for the standard library.This issue involves writing Zig code for the standard library.zig build systemstd.Build, the build runner, `zig build` subcommand, package managementstd.Build, the build runner, `zig build` subcommand, package management
if using std.build.Builder.addObject in build.zig with an object name that has a slash in it, the build fails due to "no such file or directory" as it attempts to store the resulting object in a directory inside zig-cache/o that does not exist.
this behavior was not something i expected. for the use case of converting existing (large) projects in c to use the zig build system, and integrating zig files into it, being able to have the object name and path be the same string greatly simplifies writing the build.zig file.
perhaps the build system can check for this case, and automatically create the subdirectory path for the object file?