Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to zig 0.13.0-dev.211+6a65561e3 #168

Merged
merged 2 commits into from
May 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ pub fn build(b: *std.Build) !void {

if (!skip_tests) {
const lib_test = b.addTest(.{
.root_source_file = .{ .path = "src/wrapper/sdl.zig" },
.root_source_file = .{ .cwd_relative = "src/wrapper/sdl.zig" },
.target = if (target.result.os.tag == .windows)
b.resolveTargetQuery(.{ .abi = target.result.abi })
else
Expand Down Expand Up @@ -51,7 +51,7 @@ pub fn build(b: *std.Build) !void {

const demo_wrapper = b.addExecutable(.{
.name = "demo-wrapper",
.root_source_file = .{ .path = "examples/wrapper.zig" },
.root_source_file = .{ .cwd_relative = "examples/wrapper.zig" },
.target = target,
.optimize = optimize,
});
Expand All @@ -61,7 +61,7 @@ pub fn build(b: *std.Build) !void {

const demo_wrapper_image = b.addExecutable(.{
.name = "demo-wrapper-image",
.root_source_file = .{ .path = "examples/wrapper-image.zig" },
.root_source_file = .{ .cwd_relative = "examples/wrapper-image.zig" },
.target = target,
.optimize = optimize,
});
Expand All @@ -79,7 +79,7 @@ pub fn build(b: *std.Build) !void {

const demo_native = b.addExecutable(.{
.name = "demo-native",
.root_source_file = .{ .path = "examples/native.zig" },
.root_source_file = .{ .cwd_relative = "examples/native.zig" },
.target = target,
.optimize = optimize,
});
Expand Down Expand Up @@ -157,7 +157,7 @@ pub fn getNativeModule(sdk: *Sdk) *Build.Module {
const build_options = sdk.build.addOptions();
build_options.addOption(bool, "vulkan", false);
return sdk.build.createModule(.{
.root_source_file = .{ .path = sdkPath("/src/binding/sdl.zig") },
.root_source_file = .{ .cwd_relative = sdkPath("/src/binding/sdl.zig") },
.imports = &.{
.{
.name = sdk.build.dupe("build_options"),
Expand All @@ -175,7 +175,7 @@ pub fn getNativeModuleVulkan(sdk: *Sdk, vulkan: *Build.Module) *Build.Module {
const build_options = sdk.build.addOptions();
build_options.addOption(bool, "vulkan", true);
return sdk.build.createModule(.{
.root_source_file = .{ .path = sdkPath("/src/binding/sdl.zig") },
.root_source_file = .{ .cwd_relative = sdkPath("/src/binding/sdl.zig") },
.imports = &.{
.{
.name = sdk.build.dupe("build_options"),
Expand All @@ -192,7 +192,7 @@ pub fn getNativeModuleVulkan(sdk: *Sdk, vulkan: *Build.Module) *Build.Module {
/// Returns the smart wrapper for the SDL api. Contains convenient zig types, tagged unions and so on.
pub fn getWrapperModule(sdk: *Sdk) *Build.Module {
return sdk.build.createModule(.{
.root_source_file = .{ .path = sdkPath("/src/wrapper/sdl.zig") },
.root_source_file = .{ .cwd_relative = sdkPath("/src/wrapper/sdl.zig") },
.imports = &.{
.{
.name = sdk.build.dupe("sdl-native"),
Expand All @@ -206,7 +206,7 @@ pub fn getWrapperModule(sdk: *Sdk) *Build.Module {
/// provided as an argument.
pub fn getWrapperModuleVulkan(sdk: *Sdk, vulkan: *Build.Module) *Build.Module {
return sdk.build.createModule(.{
.root_source_file = .{ .path = sdkPath("/src/wrapper/sdl.zig") },
.root_source_file = .{ .cwd_relative = sdkPath("/src/wrapper/sdl.zig") },
.imports = &.{
.{
.name = sdk.build.dupe("sdl-native"),
Expand Down Expand Up @@ -500,7 +500,7 @@ const PrepareStubSourceStep = struct {
}

pub fn getStubFile(self: *Self) LazyPath {
return .{ .generated = &self.assembly_source };
return .{ .generated = .{ .file = &self.assembly_source } };
}

fn make(step: *Step, prog_node: *std.Progress.Node) !void {
Expand Down
Loading