aboutsummaryrefslogtreecommitdiff
path: root/src/Compilation.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-11-04 18:35:04 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-12-06 12:15:04 -0700
commitdb023b98a4deef527d4c70d146009f754e9b168d (patch)
treece17bf192695b873c1e6ecb221a22a0d3a30048b /src/Compilation.zig
parent28514476ef8c824c3d189d98f23d0f8d23e496ea (diff)
downloadzig-db023b98a4deef527d4c70d146009f754e9b168d.tar.gz
zig-db023b98a4deef527d4c70d146009f754e9b168d.zip
build: introduce -Dwasi-bootstrap option
Also, make -Donly-c prevent Autodoc from being included in the binary. This produces a 2.6 MiB zig.wasm file. 781 KB if piped through zstd.
Diffstat (limited to 'src/Compilation.zig')
-rw-r--r--src/Compilation.zig12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig
index a0b78394e7..853d83485a 100644
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -2421,11 +2421,13 @@ pub fn update(comp: *Compilation) !void {
return;
}
- if (comp.emit_docs) |doc_location| {
- if (comp.bin_file.options.module) |module| {
- var autodoc = Autodoc.init(module, doc_location);
- defer autodoc.deinit();
- try autodoc.generateZirData();
+ if (!build_options.only_c) {
+ if (comp.emit_docs) |doc_location| {
+ if (comp.bin_file.options.module) |module| {
+ var autodoc = Autodoc.init(module, doc_location);
+ defer autodoc.deinit();
+ try autodoc.generateZirData();
+ }
}
}