diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-01-06 16:47:09 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-01-06 16:47:09 -0700 |
| commit | efe94a9a1289db274be326d6d66a19caeee86d33 (patch) | |
| tree | 95dd2f96a79284df771dad7746790daa4bc810be /src/Compilation.zig | |
| parent | 91e3431d4a55aa46884b267be5aa586f3ed94f74 (diff) | |
| download | zig-efe94a9a1289db274be326d6d66a19caeee86d33.tar.gz zig-efe94a9a1289db274be326d6d66a19caeee86d33.zip | |
stage2: C backend: support unused Decls
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index 4efb845a82..8e2da5aec4 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -527,6 +527,10 @@ pub fn create(gpa: *Allocator, options: InitOptions) !*Compilation { if (options.root_pkg == null) break :blk false; + // If we are outputting .c code we must use Zig backend. + if (ofmt == .c) + break :blk false; + // If we are the stage1 compiler, we depend on the stage1 c++ llvm backend // to compile zig code. if (build_options.is_stage1) |
