@@ -3,7 +3,7 @@ const builtin = @import("builtin");
33
44pub const generate_ide = @import ("src/tools/generate_ide.zig" );
55
6- const min_zig_version = std .SemanticVersion .parse ("0.14.0 " ) catch @panic ("Where is .zigversion?" );
6+ const min_zig_version = std .SemanticVersion .parse ("0.15.1 " ) catch @panic ("Where is .zigversion?" );
77const cetech1_version = std .SemanticVersion .parse (@embedFile (".version" )) catch @panic ("Where is .version?" );
88
99pub fn useSystemSDK (b : * std.Build , target : std.Build.ResolvedTarget , e : * std.Build.Step.Compile ) void {
@@ -129,9 +129,12 @@ pub fn createKernelExe(
129129 const exe = b .addExecutable (.{
130130 .name = bin_name ,
131131 .version = versionn ,
132- .root_source_file = runner_main ,
133- .target = target ,
134- .optimize = optimize ,
132+ .root_module = b .createModule (.{
133+ .root_source_file = runner_main ,
134+ .target = target ,
135+ .optimize = optimize ,
136+ }),
137+ .use_llvm = true ,
135138 });
136139 exe .linkLibC ();
137140 exe .root_module .addImport ("kernel" , cetech1_kernel );
@@ -246,6 +249,7 @@ pub fn build(b: *std.Build) !void {
246249 .with_node_editor = true ,
247250 .with_te = true ,
248251 .with_freetype = options .with_freetype ,
252+ // .disable_obsolete = false
249253 },
250254 );
251255
@@ -289,20 +293,26 @@ pub fn build(b: *std.Build) !void {
289293
290294 const generate_static_tool = b .addExecutable (.{
291295 .name = "generate_static" ,
292- .root_source_file = b .path ("src/tools/generate_static.zig" ),
293- .target = b .graph .host ,
296+ .root_module = b .createModule (.{
297+ .root_source_file = b .path ("src/tools/generate_static.zig" ),
298+ .target = b .graph .host ,
299+ }),
294300 });
295301
296302 const generate_externals_tool = b .addExecutable (.{
297303 .name = "generate_externals" ,
298- .root_source_file = b .path ("src/tools/generate_externals.zig" ),
299- .target = b .graph .host ,
304+ .root_module = b .createModule (.{
305+ .root_source_file = b .path ("src/tools/generate_externals.zig" ),
306+ .target = b .graph .host ,
307+ }),
300308 });
301309
302310 const generate_ide_tool = b .addExecutable (.{
303311 .name = "generate_ide" ,
304- .root_source_file = b .path ("src/tools/generate_ide.zig" ),
305- .target = b .graph .host ,
312+ .root_module = b .createModule (.{
313+ .root_source_file = b .path ("src/tools/generate_ide.zig" ),
314+ .target = b .graph .host ,
315+ }),
306316 });
307317 b .installArtifact (generate_ide_tool );
308318
@@ -452,7 +462,6 @@ pub fn build(b: *std.Build) !void {
452462 .name = "gamecontrollerdb" ,
453463 .module = b .createModule (.{ .root_source_file = b .path ("externals/shared/lib/SDL_GameControllerDB/gamecontrollerdb.txt" ) }),
454464 },
455- .{ .name = "authors" , .module = b .createModule (.{ .root_source_file = b .path ("externals/shared/lib/SDL_GameControllerDB/gamecontrollerdb.txt" ) }) },
456465 .{
457466 .name = "fa-solid-900" ,
458467 .module = b .createModule (.{ .root_source_file = b .path ("externals/shared/fonts/fa-solid-900.ttf" ) }),
@@ -466,12 +475,15 @@ pub fn build(b: *std.Build) !void {
466475 //
467476 // CETech1 kernel lib
468477 //
469- const kernel_lib = b .addStaticLibrary (.{
478+ const kernel_lib = b .addLibrary (.{
479+ .linkage = .static ,
470480 .name = "cetech1_kernel" ,
471481 .version = cetech1_version ,
472- .root_source_file = b .path ("src/private.zig" ),
473- .target = target ,
474- .optimize = optimize ,
482+ .root_module = b .createModule (.{
483+ .root_source_file = b .path ("src/private.zig" ),
484+ .target = target ,
485+ .optimize = optimize ,
486+ }),
475487 });
476488 useSystemSDK (b , target , kernel_lib );
477489 b .installArtifact (kernel_lib );
@@ -513,15 +525,13 @@ pub fn build(b: *std.Build) !void {
513525 //
514526 const tests = b .addTest (.{
515527 .name = "cetech1_test" ,
516- .version = cetech1_version ,
517528 .root_module = b .createModule (.{
518529 .root_source_file = b .path ("src/tests.zig" ),
519530 .target = target ,
520531 .optimize = optimize ,
521532 .imports = & imports ,
522533 }),
523- .target = target ,
524- .optimize = optimize ,
534+ .use_llvm = true ,
525535 });
526536 useSystemSDK (b , target , tests );
527537 b .installArtifact (tests );
0 commit comments