diff --git a/src/main_zig.zig b/src/main_zig.zig index 01268514..c42177c4 100644 --- a/src/main_zig.zig +++ b/src/main_zig.zig @@ -598,11 +598,11 @@ pub fn generateMainZigFromTemplate( " g.dispatchEvents();\n" ++ " // Update profiling pointers (debug only)\n" ++ " if (comptime @TypeOf(runner).profiling_enabled) {\n" ++ - " g.script_profile_ptr = @ptrCast(&runner.profile);\n" ++ + " g.script_profile_ptr = @ptrCast(@alignCast(&runner.profile));\n" ++ " g.script_profile_count = @TypeOf(runner).script_count;\n" ++ " }\n" ++ " if (comptime PluginSystems.profiling_enabled) {\n" ++ - " g.plugin_profile_ptr = @ptrCast(&PluginSystems.plugin_profile);\n" ++ + " g.plugin_profile_ptr = @ptrCast(@alignCast(&PluginSystems.plugin_profile));\n" ++ " g.plugin_profile_count = PluginSystems.plugin_system_count;\n" ++ " }\n" else @@ -612,7 +612,7 @@ pub fn generateMainZigFromTemplate( " }\n" ++ " g.dispatchEvents();\n" ++ " if (comptime @TypeOf(runner).profiling_enabled) {\n" ++ - " g.script_profile_ptr = @ptrCast(&runner.profile);\n" ++ + " g.script_profile_ptr = @ptrCast(@alignCast(&runner.profile));\n" ++ " g.script_profile_count = @TypeOf(runner).script_count;\n" ++ " }\n"; diff --git a/src/templates/build_zig.txt b/src/templates/build_zig.txt index 062bf499..42847fb6 100644 --- a/src/templates/build_zig.txt +++ b/src/templates/build_zig.txt @@ -273,7 +273,7 @@ pub fn build(b: *std.Build) void { const sdk_path = getIosSdkPath(b, sdk_name) orelse @panic("Could not find iOS SDK. Is Xcode installed?"); - const host_arch = b.host.result.cpu.arch; + const host_arch = b.graph.host.result.cpu.arch; const ios_target = if (device_mode) b.resolveTargetQuery(.{ .cpu_arch = .aarch64,