Skip to content

zig build fails when a custom output directory is set with setOutputDir #3254

@AnthonyYoManz

Description

@AnthonyYoManz

Reproduction steps:

  • Be on Windows
  • Create an empty folder called 'test_project' and run zig init-exe
  • Add the following line to 'build.zig': exe.setOutputDir("out");
  • Run zig build
  • Build claims failure, citing a file could not be found
  • Executable has been successfully output into test_project/out
  • No PDB file is present in test_project/out

Adding a warn call to std.fs.file.File.openRead suggests that an attempt is made to read from 'test_project/out/test_project.pdb' when it does not exist, causing the FileNotFound error and the build failure message.

build log.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    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