-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes for compatibility with zig 0.11.0 (#190)
Not ready to merge. After these changes, the modules can individually build with 0.11.0-dev.3132+465272921 but the testrunner build command fails: ``` $ zig build --build-file test/testrunner/build.zig --prefix ./ zig build-exe testrunner Debug native: error: warning: FileNotFound: test/testrunner/src/main.zig error: FileNotFound ``` Yours truly looked into it and found that it is a build system bug. Here's the fix: ziglang/zig#15717 Hopefully that can get into the release. Shake and bake! --------- Co-authored-by: Malcolm Still <malcolm.still@gmail.com>
- Loading branch information
1 parent
9cba003
commit eace09d
Showing
21 changed files
with
395 additions
and
321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
zig-cache | ||
zig-out | ||
test/testrunner/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,23 @@ | ||
const Builder = @import("std").build.Builder; | ||
|
||
pub fn build(b: *Builder) void { | ||
const mode = b.standardReleaseOptions(); | ||
const lib = b.addStaticLibrary("zware", "src/main.zig"); | ||
lib.setBuildMode(mode); | ||
lib.install(); | ||
const target = b.standardTargetOptions(.{}); | ||
const optimize = b.standardOptimizeOption(.{}); | ||
|
||
var main_tests = b.addTest("src/main.zig"); | ||
main_tests.setBuildMode(mode); | ||
const lib = b.addStaticLibrary(.{ | ||
.name = "zware", | ||
.root_source_file = .{ .path = "src/main.zig" }, | ||
.target = target, | ||
.optimize = optimize, | ||
}); | ||
b.installArtifact(lib); | ||
|
||
const main_tests = b.addTest(.{ | ||
.root_source_file = .{ .path = "src/main.zig" }, | ||
.optimize = optimize, | ||
}); | ||
|
||
const run_main_tests = b.addRunArtifact(main_tests); | ||
const test_step = b.step("test", "Run library tests"); | ||
test_step.dependOn(&main_tests.step); | ||
test_step.dependOn(&run_main_tests.step); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.