From 30dfdfdbd09570f97420413015eb8a1517382961 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 24 Sep 2020 23:50:15 -0700 Subject: fix a round of regressions in this branch * Don't try to generate C header files yet since it will only cause a crash saying the feature is unimplemented. * Rename the CLI options for release modes to use the `-O` prefix to match C compiler precedent. Options are now `-ODebug`, `-OReleaseFast`, `-OReleaseSafe`, `-OReleaseSmall`. The optimization mode matches the enum tags of std.builtin.Mode. It is planned to, at some point, rename std.builtin.Mode to std.builtin.OptimizationMode and modify the tags to be lower case to match the style convention. - Update build.zig code to support this new CLI. * update std.zig.binNameAlloc to support an optional Version and update the implementation to correctly deal with dynamic library version suffixes. --- src/Compilation.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/Compilation.zig') diff --git a/src/Compilation.zig b/src/Compilation.zig index 03da22d80c..bdd11abc20 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -2562,7 +2562,11 @@ pub fn build_crt_file( defer tracy.end(); const target = comp.getTarget(); - const basename = try std.zig.binNameAlloc(comp.gpa, root_name, target, output_mode, null, null); + const basename = try std.zig.binNameAlloc(comp.gpa, .{ + .root_name = root_name, + .target = target, + .output_mode = output_mode, + }); errdefer comp.gpa.free(basename); // TODO: This is extracted into a local variable to work around a stage1 miscompilation. -- cgit v1.2.3