Skip to content

putting slash in object name causes build failure #2450

Open
@goshhhy

Description

@goshhhy

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.standard libraryThis issue involves writing Zig code for the standard library.zig build systemstd.Build, the build runner, `zig build` subcommand, package management

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions