Skip to content

"zig cc -E" creates an unexpected object file #20359

Closed

Description

@markus-oberhumer

Zig Version

0.13.0

Steps to Reproduce and Observed Behavior

Probably related to macos handling.

# go to an empty directory

$ zig-0.13.0 cc -target aarch64-linux-gnu -E -x c -dM /dev/null
$ ls
# OK, still emtpy

$ zig-0.13.0 cc -target aarch64-macos-none -E -x c -dM /dev/null
$ ls
null.o
# ERROR, created file null.o !

Expected Behavior

zig cc -E should write to stdout and not create any files.

Activity

  1. added
    bug
    on Jun 20, 2024
  2. changed the title [-]"zig cc -E" creates an unexpected file[/-] [+]"zig cc -E" creates an unexpected object file[/+] on Jun 20, 2024
  3. markus-oberhumer commented on Jun 20, 2024

    @markus-oberhumer
    ContributorAuthor
  4. markus-oberhumer commented on Jun 20, 2024

    @markus-oberhumer
    ContributorAuthor
  5. Vexu commented on Jun 20, 2024

    @Vexu
    Member

    Might also be related to #13179

  6. markus-oberhumer commented on Jun 20, 2024

    @markus-oberhumer
    ContributorAuthor

    I don't think this is related:

    • zig cc -E should only write to stdout and never create any files
    • the problem only happens if you use -target XXX-macos-none, so this looks like a macos specific bug
  7. Vexu commented on Jun 20, 2024

    @Vexu
    Member
    * `zig cc -E` should only write to stdout and never create any files
    

    The files mentioned in that issue should never be created either.

    * the problem only happens if you use `-target XXX-macos-none`, so this looks like a macos specific bug
    

    I'd guess that is because we don't use LLD for macos.

  8. added
    zig cc
    on Aug 14, 2024
  9. added this to the unplanned milestone on Aug 14, 2024
  10. modified the milestones: unplanned, 0.14.0 on Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzig cc

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions