aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Cameron <ascottcameron@gmail.com>2020-11-19 19:20:10 +1100
committerAlex Cameron <ascottcameron@gmail.com>2020-12-23 01:14:35 +1100
commitaba273d7313ece312cbf747ab5808063a6d8a1b4 (patch)
treed9ee37d15a8107f5224e34cdeda2e4511b6a1eb0 /src
parent40f0275e7cb7f3f4b2c382e5b457e714080c4cf2 (diff)
downloadzig-aba273d7313ece312cbf747ab5808063a6d8a1b4.tar.gz
zig-aba273d7313ece312cbf747ab5808063a6d8a1b4.zip
Enable emit-h by default for obj and lib compilation.
Diffstat (limited to 'src')
-rw-r--r--src/main.zig18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/main.zig b/src/main.zig
index c25bc20d85..c307dc7819 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -591,16 +591,14 @@ fn buildOutputType(
},
else => unreachable,
}
- // TODO finish self-hosted and add support for emitting C header files
- emit_h = .no;
- //switch (arg_mode) {
- // .build => switch (output_mode) {
- // .Exe => emit_h = .no,
- // .Obj, .Lib => emit_h = .yes_default_path,
- // },
- // .translate_c, .zig_test, .run => emit_h = .no,
- // else => unreachable,
- //}
+ switch (arg_mode) {
+ .build => switch (output_mode) {
+ .Exe => emit_h = .no,
+ .Obj, .Lib => emit_h = .yes_default_path,
+ },
+ .translate_c, .zig_test, .run => emit_h = .no,
+ else => unreachable,
+ }
soname = .yes_default_value;
const args = all_args[2..];