authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-23 19:52:29-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-07-24 02:37:25-07:00
log575a7cccc0d9da542bd611f73e570d840f261bf5
treef548605cf44a47c9fcab5fa29b3ccd17adaf1a06
parentd21d1d4ba25701410b9ae99921326f8bfc8a44dd

CLI: delete dead option -femit-analysis

This used to do something with the old autodocs system. Now it does nothing.

3 files changed, 0 insertions(+), 35 deletions(-)

lib/std/Build/Step/Compile.zig-2
......@@ -46,7 +46,6 @@ framework_dirs: ArrayList(FileSource),
4646frameworks: StringHashMap(FrameworkLinkInfo),
4747verbose_link: bool,
4848verbose_cc: bool,
49emit_analysis: EmitOption = .default,
5049emit_asm: EmitOption = .default,
5150emit_bin: EmitOption = .default,
5251emit_implib: EmitOption = .default,
......@@ -1516,7 +1515,6 @@ fn make(step: *Step, prog_node: *std.Progress.Node) !void {
15161515 if (b.verbose_cc or self.verbose_cc) try zig_args.append("--verbose-cc");
15171516 if (b.verbose_llvm_cpu_features) try zig_args.append("--verbose-llvm-cpu-features");
15181517
1519 if (self.emit_analysis.getArg(b, "emit-analysis")) |arg| try zig_args.append(arg);
15201518 if (self.emit_asm.getArg(b, "emit-asm")) |arg| try zig_args.append(arg);
15211519 if (self.emit_bin.getArg(b, "emit-bin")) |arg| try zig_args.append(arg);
15221520 if (self.generated_docs != null) try zig_args.append("-femit-docs");
src/Compilation.zig-5
......@@ -179,7 +179,6 @@ test_name_prefix: ?[]const u8,
179179emit_asm: ?EmitLoc,
180180emit_llvm_ir: ?EmitLoc,
181181emit_llvm_bc: ?EmitLoc,
182emit_analysis: ?EmitLoc,
183182
184183work_queue_wait_group: WaitGroup = .{},
185184astgen_wait_group: WaitGroup = .{},
......@@ -482,8 +481,6 @@ pub const InitOptions = struct {
482481 emit_llvm_ir: ?EmitLoc = null,
483482 /// `null` means to not emit LLVM module bitcode.
484483 emit_llvm_bc: ?EmitLoc = null,
485 /// `null` means to not emit semantic analysis JSON.
486 emit_analysis: ?EmitLoc = null,
487484 /// `null` means to not emit docs.
488485 emit_docs: ?EmitLoc = null,
489486 /// `null` means to not emit an import lib.
......@@ -1590,7 +1587,6 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
15901587 .emit_asm = options.emit_asm,
15911588 .emit_llvm_ir = options.emit_llvm_ir,
15921589 .emit_llvm_bc = options.emit_llvm_bc,
1593 .emit_analysis = options.emit_analysis,
15941590 .work_queue = std.fifo.LinearFifo(Job, .Dynamic).init(gpa),
15951591 .anon_work_queue = std.fifo.LinearFifo(Job, .Dynamic).init(gpa),
15961592 .c_object_work_queue = std.fifo.LinearFifo(*CObject, .Dynamic).init(gpa),
......@@ -2329,7 +2325,6 @@ fn addNonIncrementalStuffToCacheManifest(comp: *Compilation, man: *Cache.Manifes
23292325 cache_helpers.addOptionalEmitLoc(&man.hash, comp.emit_asm);
23302326 cache_helpers.addOptionalEmitLoc(&man.hash, comp.emit_llvm_ir);
23312327 cache_helpers.addOptionalEmitLoc(&man.hash, comp.emit_llvm_bc);
2332 cache_helpers.addOptionalEmitLoc(&man.hash, comp.emit_analysis);
23332328
23342329 man.hash.addListOfBytes(comp.clang_argv);
23352330
src/main.zig-28
......@@ -384,8 +384,6 @@ const usage_build_generic =
384384 \\ -fno-emit-h (default) Do not generate a C header file (.h)
385385 \\ -femit-docs[=path] Create a docs/ dir with html documentation
386386 \\ -fno-emit-docs (default) Do not produce docs/ dir with html documentation
387 \\ -femit-analysis[=path] Write analysis JSON file with type information
388 \\ -fno-emit-analysis (default) Do not write analysis JSON file with type information
389387 \\ -femit-implib[=path] (default) Produce an import .lib when building a Windows DLL
390388 \\ -fno-emit-implib Do not produce an import .lib when building a Windows DLL
391389 \\ --show-builtin Output the source of @import("builtin") then exit
......@@ -755,7 +753,6 @@ fn buildOutputType(
755753 var emit_llvm_ir: Emit = .no;
756754 var emit_llvm_bc: Emit = .no;
757755 var emit_docs: Emit = .no;
758 var emit_analysis: Emit = .no;
759756 var emit_implib: Emit = .yes_default_path;
760757 var emit_implib_arg_provided = false;
761758 var target_arch_os_abi: []const u8 = "native";
......@@ -1336,12 +1333,6 @@ fn buildOutputType(
13361333 emit_docs = .{ .yes = arg["-femit-docs=".len..] };
13371334 } else if (mem.eql(u8, arg, "-fno-emit-docs")) {
13381335 emit_docs = .no;
1339 } else if (mem.eql(u8, arg, "-femit-analysis")) {
1340 emit_analysis = .yes_default_path;
1341 } else if (mem.startsWith(u8, arg, "-femit-analysis=")) {
1342 emit_analysis = .{ .yes = arg["-femit-analysis=".len..] };
1343 } else if (mem.eql(u8, arg, "-fno-emit-analysis")) {
1344 emit_analysis = .no;
13451336 } else if (mem.eql(u8, arg, "-femit-implib")) {
13461337 emit_implib = .yes_default_path;
13471338 emit_implib_arg_provided = true;
......@@ -2824,24 +2815,6 @@ fn buildOutputType(
28242815 };
28252816 defer emit_llvm_bc_resolved.deinit();
28262817
2827 const default_analysis_basename = try std.fmt.allocPrint(arena, "{s}-analysis.json", .{root_name});
2828 var emit_analysis_resolved = emit_analysis.resolve(default_analysis_basename, output_to_cache) catch |err| {
2829 switch (emit_analysis) {
2830 .yes => |p| {
2831 fatal("unable to open directory from argument '-femit-analysis', '{s}': {s}", .{
2832 p, @errorName(err),
2833 });
2834 },
2835 .yes_default_path => {
2836 fatal("unable to open directory from arguments 'name' or 'soname', '{s}': {s}", .{
2837 default_analysis_basename, @errorName(err),
2838 });
2839 },
2840 .no => unreachable,
2841 }
2842 };
2843 defer emit_analysis_resolved.deinit();
2844
28452818 var emit_docs_resolved = emit_docs.resolve("docs", output_to_cache) catch |err| {
28462819 switch (emit_docs) {
28472820 .yes => |p| {
......@@ -3096,7 +3069,6 @@ fn buildOutputType(
30963069 .emit_llvm_ir = emit_llvm_ir_resolved.data,
30973070 .emit_llvm_bc = emit_llvm_bc_resolved.data,
30983071 .emit_docs = emit_docs_resolved.data,
3099 .emit_analysis = emit_analysis_resolved.data,
31003072 .emit_implib = emit_implib_resolved.data,
31013073 .link_mode = link_mode,
31023074 .dll_export_fns = dll_export_fns,