-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Compiler Panic when linking object file that doesn't exist in zig build #12473
Copy link
Copy link
Open
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorstage1The process of building from source via WebAssembly and the C backend.The process of building from source via WebAssembly and the C backend.
Milestone
Description
Zig Version
0.10.0-dev.3597+79757f233
Steps to Reproduce
- Link to an object file that doesn't exist using
target.addObjectFile("file.o") - Observe the error
Expected Behavior
Some sort of better error than a panic
Actual Behavior
A panic due to unwrapping an error. The error message is as follows:
warning: FileNotFound: file.o
thread 263245 panic: attempt to unwrap error: FileNotFound
This error happens in stage1.zig:48:43 where stage2 is called. Stage1 expects no error to be thrown, so catch unreachable is used.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behaviorstage1The process of building from source via WebAssembly and the C backend.The process of building from source via WebAssembly and the C backend.