diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-11-15 17:40:04 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-12-06 12:15:04 -0700 |
| commit | 39fd77bc163f0d7fc7408cbb4e48f960b4739448 (patch) | |
| tree | f32d6bbf639cf5840e72bb4a5ed6f5c56dc6165f /lib | |
| parent | ef447c3ecac4211a0a03f487e84acc61160d7ede (diff) | |
| download | zig-39fd77bc163f0d7fc7408cbb4e48f960b4739448.tar.gz zig-39fd77bc163f0d7fc7408cbb4e48f960b4739448.zip | |
interpret the WASI blob to produce zig2.c and compiler_rt.c
* synchronize zig1.c from zig-wasi external project
* change the way argv works to avoid absolute paths
* autodetect isatty
* compiler_rt: disable some functions when object format is C
* add missing flag from config.zig.in
The next problem is that compiling compiler_rt.c with gcc gives
"conflicting types" errors for `__eqhf2` and friends.
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/compiler_rt.zig | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/lib/compiler_rt.zig b/lib/compiler_rt.zig index 44146d04e9..3ffaf9f0e5 100644 --- a/lib/compiler_rt.zig +++ b/lib/compiler_rt.zig @@ -3,13 +3,6 @@ const builtin = @import("builtin"); pub const panic = @import("compiler_rt/common.zig").panic; comptime { - _ = @import("compiler_rt/atomics.zig"); - - // macOS has these functions inside libSystem. - if (builtin.cpu.arch.isAARCH64() and !builtin.os.tag.isDarwin()) { - _ = @import("compiler_rt/aarch64_outline_atomics.zig"); - } - _ = @import("compiler_rt/addf3.zig"); _ = @import("compiler_rt/addhf3.zig"); _ = @import("compiler_rt/addsf3.zig"); @@ -216,9 +209,18 @@ comptime { _ = @import("compiler_rt/aullrem.zig"); _ = @import("compiler_rt/clear_cache.zig"); - _ = @import("compiler_rt/memcpy.zig"); - _ = @import("compiler_rt/memset.zig"); - _ = @import("compiler_rt/memmove.zig"); - _ = @import("compiler_rt/memcmp.zig"); - _ = @import("compiler_rt/bcmp.zig"); + if (@import("builtin").object_format != .c) { + _ = @import("compiler_rt/atomics.zig"); + + // macOS has these functions inside libSystem. + if (builtin.cpu.arch.isAARCH64() and !builtin.os.tag.isDarwin()) { + _ = @import("compiler_rt/aarch64_outline_atomics.zig"); + } + + _ = @import("compiler_rt/memcpy.zig"); + _ = @import("compiler_rt/memset.zig"); + _ = @import("compiler_rt/memmove.zig"); + _ = @import("compiler_rt/memcmp.zig"); + _ = @import("compiler_rt/bcmp.zig"); + } } |
