diff --git a/cli/tests/fixtures/multi-dep-str/platform/host.zig b/cli/tests/fixtures/multi-dep-str/platform/host.zig index 39b38e999e..251cf5f76e 100644 --- a/cli/tests/fixtures/multi-dep-str/platform/host.zig +++ b/cli/tests/fixtures/multi-dep-str/platform/host.zig @@ -5,6 +5,9 @@ const testing = std.testing; const expectEqual = testing.expectEqual; const expect = testing.expect; +comptime { _ = @import("compiler_rt"); } + + const mem = std.mem; const Allocator = mem.Allocator; diff --git a/cli/tests/fixtures/multi-dep-thunk/platform/host.zig b/cli/tests/fixtures/multi-dep-thunk/platform/host.zig index 39b38e999e..251cf5f76e 100644 --- a/cli/tests/fixtures/multi-dep-thunk/platform/host.zig +++ b/cli/tests/fixtures/multi-dep-thunk/platform/host.zig @@ -5,6 +5,9 @@ const testing = std.testing; const expectEqual = testing.expectEqual; const expect = testing.expect; +comptime { _ = @import("compiler_rt"); } + + const mem = std.mem; const Allocator = mem.Allocator; diff --git a/compiler/build/src/link.rs b/compiler/build/src/link.rs index 613caec6b9..8a6d2721ad 100644 --- a/compiler/build/src/link.rs +++ b/compiler/build/src/link.rs @@ -79,6 +79,8 @@ pub fn rebuild_host(host_input_path: &Path) { &zig_str_path ); + let zig_env = "/usr/local/Cellar/zig/HEAD-6ab5beb/lib/zig/std/special/compiler_rt.zig"; + let output = Command::new("zig") .env_clear() .env("PATH", &env_path) @@ -92,7 +94,12 @@ pub fn rebuild_host(host_input_path: &Path) { zig_str_path.to_str().unwrap(), "--pkg-end", // include the zig runtime - "-fcompiler-rt", + + // "-fcompiler-rt", + "--pkg-begin", + "compiler_rt", + zig_env, + "--pkg-end", // include libc "--library", "c", diff --git a/examples/benchmarks/closure b/examples/benchmarks/closure index be46458b83..18e4bbe070 100755 Binary files a/examples/benchmarks/closure and b/examples/benchmarks/closure differ diff --git a/examples/benchmarks/platform/host.zig b/examples/benchmarks/platform/host.zig index f0ccca2643..b467b825b9 100644 --- a/examples/benchmarks/platform/host.zig +++ b/examples/benchmarks/platform/host.zig @@ -6,6 +6,9 @@ const expectEqual = testing.expectEqual; const expect = testing.expect; const maxInt = std.math.maxInt; +comptime { _ = @import("compiler_rt"); } + + const mem = std.mem; const Allocator = mem.Allocator; diff --git a/examples/benchmarks/rbtree-del b/examples/benchmarks/rbtree-del index dd4abed435..3c6b50bc27 100755 Binary files a/examples/benchmarks/rbtree-del and b/examples/benchmarks/rbtree-del differ diff --git a/examples/benchmarks/test-astar b/examples/benchmarks/test-astar index b06fddbf29..3a348f982f 100755 Binary files a/examples/benchmarks/test-astar and b/examples/benchmarks/test-astar differ diff --git a/examples/benchmarks/test-base64 b/examples/benchmarks/test-base64 index ecd3ffdecd..1149c3cd06 100755 Binary files a/examples/benchmarks/test-base64 and b/examples/benchmarks/test-base64 differ diff --git a/examples/quicksort/platform/host.zig b/examples/quicksort/platform/host.zig index bc5d13ce4a..1a3ab5e8eb 100644 --- a/examples/quicksort/platform/host.zig +++ b/examples/quicksort/platform/host.zig @@ -3,6 +3,8 @@ const testing = std.testing; const expectEqual = testing.expectEqual; const expect = testing.expect; +comptime { _ = @import("compiler_rt"); } + const mem = std.mem; const Allocator = mem.Allocator;