Added comptime import compiler_rt to several host.zig files

This commit is contained in:
Chadtech 2021-03-14 14:08:21 -04:00 committed by Richard Feldman
parent beacdfda31
commit 7d78de110b
9 changed files with 19 additions and 1 deletions

View file

@ -5,6 +5,9 @@ const testing = std.testing;
const expectEqual = testing.expectEqual; const expectEqual = testing.expectEqual;
const expect = testing.expect; const expect = testing.expect;
comptime { _ = @import("compiler_rt"); }
const mem = std.mem; const mem = std.mem;
const Allocator = mem.Allocator; const Allocator = mem.Allocator;

View file

@ -5,6 +5,9 @@ const testing = std.testing;
const expectEqual = testing.expectEqual; const expectEqual = testing.expectEqual;
const expect = testing.expect; const expect = testing.expect;
comptime { _ = @import("compiler_rt"); }
const mem = std.mem; const mem = std.mem;
const Allocator = mem.Allocator; const Allocator = mem.Allocator;

View file

@ -79,6 +79,8 @@ pub fn rebuild_host(host_input_path: &Path) {
&zig_str_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") let output = Command::new("zig")
.env_clear() .env_clear()
.env("PATH", &env_path) .env("PATH", &env_path)
@ -92,7 +94,12 @@ pub fn rebuild_host(host_input_path: &Path) {
zig_str_path.to_str().unwrap(), zig_str_path.to_str().unwrap(),
"--pkg-end", "--pkg-end",
// include the zig runtime // include the zig runtime
"-fcompiler-rt",
// "-fcompiler-rt",
"--pkg-begin",
"compiler_rt",
zig_env,
"--pkg-end",
// include libc // include libc
"--library", "--library",
"c", "c",

Binary file not shown.

View file

@ -6,6 +6,9 @@ const expectEqual = testing.expectEqual;
const expect = testing.expect; const expect = testing.expect;
const maxInt = std.math.maxInt; const maxInt = std.math.maxInt;
comptime { _ = @import("compiler_rt"); }
const mem = std.mem; const mem = std.mem;
const Allocator = mem.Allocator; const Allocator = mem.Allocator;

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -3,6 +3,8 @@ const testing = std.testing;
const expectEqual = testing.expectEqual; const expectEqual = testing.expectEqual;
const expect = testing.expect; const expect = testing.expect;
comptime { _ = @import("compiler_rt"); }
const mem = std.mem; const mem = std.mem;
const Allocator = mem.Allocator; const Allocator = mem.Allocator;