@@ -7,8 +7,6 @@ pub fn build(b: *std.Build) !void {
77 "Filter tests to run" ,
88 ) orelse &.{};
99
10- const trace = b .option (bool , "trace" , "enable tracy tracing" ) orelse false ;
11-
1210 const coverage = b .option (
1311 bool ,
1412 "coverage" ,
@@ -21,15 +19,14 @@ pub fn build(b: *std.Build) !void {
2119 "version" ,
2220 try getVersionString (b , coreutils_version , b .build_root .path .? ),
2321 );
24- options .addOption (bool , "trace" , trace );
2522 const options_module = options .createModule ();
2623
2724 // exe
2825 {
2926 const target = b .standardTargetOptions (.{});
3027
3128 const coreutils_target = CoreutilsTarget .fromOsTag (target .result .os .tag ) orelse {
32- std .debug .panic ("unsupported target OS {s }" , .{@tagName ( target .result .os .tag ) });
29+ std .debug .panic ("unsupported target OS {t }" , .{target .result .os .tag });
3330 };
3431
3532 const coreutils_exe = b .addExecutable (.{
@@ -38,7 +35,6 @@ pub fn build(b: *std.Build) !void {
3835 b ,
3936 target ,
4037 optimize ,
41- trace ,
4238 coreutils_target ,
4339 options_module ,
4440 ),
@@ -79,7 +75,6 @@ pub fn build(b: *std.Build) !void {
7975 b ,
8076 target ,
8177 optimize ,
82- trace ,
8378 coreutils_target ,
8479 options_module ,
8580 target .result .os .tag == builtin .os .tag ,
@@ -97,29 +92,16 @@ fn createRootModule(
9792 b : * std.Build ,
9893 target : std.Build.ResolvedTarget ,
9994 optimize : std.builtin.OptimizeMode ,
100- trace : bool ,
10195 coreutils_target : CoreutilsTarget ,
10296 options_module : * std.Build.Module ,
10397) * std.Build.Module {
104- const tracy_dep = b .dependency ("tracy" , .{
105- .target = target ,
106- .optimize = optimize ,
107- });
108-
10998 const coreutils_module = b .createModule (.{
11099 .root_source_file = b .path ("src/main.zig" ),
111100 .target = target ,
112101 .optimize = optimize ,
113102 });
114103
115104 coreutils_module .addImport ("options" , options_module );
116- coreutils_module .addImport ("tracy" , tracy_dep .module ("tracy" ));
117-
118- if (trace ) {
119- coreutils_module .addImport ("tracy_impl" , tracy_dep .module ("tracy_impl_enabled" ));
120- } else {
121- coreutils_module .addImport ("tracy_impl" , tracy_dep .module ("tracy_impl_disabled" ));
122- }
123105
124106 const target_options = b .addOptions ();
125107 target_options .addOption (CoreutilsTarget , "target_os" , coreutils_target );
@@ -132,7 +114,6 @@ fn createTestAndCheckSteps(
132114 b : * std.Build ,
133115 target : std.Build.ResolvedTarget ,
134116 optimize : std.builtin.OptimizeMode ,
135- trace : bool ,
136117 coreutils_target : CoreutilsTarget ,
137118 options_module : * std.Build.Module ,
138119 is_native_target : bool ,
@@ -146,13 +127,12 @@ fn createTestAndCheckSteps(
146127 b ,
147128 target ,
148129 optimize ,
149- trace ,
150130 coreutils_target ,
151131 options_module ,
152132 );
153133
154134 const coreutils_test = b .addTest (.{
155- .name = b .fmt ("test_zig-coreutils-{s }" , .{@tagName ( target .result .os .tag ) }),
135+ .name = b .fmt ("test_zig-coreutils-{t }" , .{target .result .os .tag }),
156136 .root_module = module ,
157137 .filters = test_filters ,
158138 });
@@ -178,8 +158,8 @@ fn createTestAndCheckSteps(
178158 }
179159
180160 const target_test_step = b .step (
181- b .fmt ("test_{s }" , .{@tagName ( target .result .os .tag ) }),
182- b .fmt ("Run the tests for {s }" , .{@tagName ( target .result .os .tag ) }),
161+ b .fmt ("test_{t }" , .{target .result .os .tag }),
162+ b .fmt ("Run the tests for {t }" , .{target .result .os .tag }),
183163 );
184164
185165 if (is_native_target or run_non_native_tests ) {
@@ -197,7 +177,7 @@ fn createTestAndCheckSteps(
197177 }
198178
199179 const build_exe = b .addExecutable (.{
200- .name = b .fmt ("build_zig-coreutils-{s }" , .{@tagName ( target .result .os .tag ) }),
180+ .name = b .fmt ("build_zig-coreutils-{t }" , .{target .result .os .tag }),
201181 .root_module = module ,
202182 });
203183 target_test_step .dependOn (& build_exe .step );
@@ -206,23 +186,21 @@ fn createTestAndCheckSteps(
206186
207187 {
208188 const coreutils_exe_check = b .addExecutable (.{
209- .name = b .fmt ("check_zig-coreutils-{s }" , .{@tagName ( target .result .os .tag ) }),
189+ .name = b .fmt ("check_zig-coreutils-{t }" , .{target .result .os .tag }),
210190 .root_module = createRootModule (
211191 b ,
212192 target ,
213193 optimize ,
214- trace ,
215194 coreutils_target ,
216195 options_module ,
217196 ),
218197 });
219198 const coreutils_test_check = b .addTest (.{
220- .name = b .fmt ("check_test_zig-coreutils-{s }" , .{@tagName ( target .result .os .tag ) }),
199+ .name = b .fmt ("check_test_zig-coreutils-{t }" , .{target .result .os .tag }),
221200 .root_module = createRootModule (
222201 b ,
223202 target ,
224203 optimize ,
225- trace ,
226204 coreutils_target ,
227205 options_module ,
228206 ),
@@ -304,7 +282,7 @@ fn getVersionString(b: *std.Build, base_semantic_version: std.SemanticVersion, r
304282 const ancestor_version = try std .SemanticVersion .parse (tagged_ancestor_version_string );
305283 if (base_semantic_version .order (ancestor_version ) != .gt ) {
306284 std .debug .print (
307- "version '{}' must be greater than tagged ancestor '{}'\n " ,
285+ "version '{f }' must be greater than tagged ancestor '{f }'\n " ,
308286 .{ base_semantic_version , ancestor_version },
309287 );
310288 std .process .exit (1 );
0 commit comments