mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
compiler-rt: disable some exports for ofmt=c
This commit is contained in:
parent
f8b779c114
commit
98037a0238
3 changed files with 10 additions and 4 deletions
|
|
@ -453,7 +453,7 @@ fn __atomic_fetch_nand_8(ptr: *u64, val: u64, model: i32) callconv(.C) u64 {
|
|||
}
|
||||
|
||||
comptime {
|
||||
if (supports_atomic_ops) {
|
||||
if (supports_atomic_ops and builtin.object_format != .c) {
|
||||
@export(__atomic_load, .{ .name = "__atomic_load", .linkage = linkage });
|
||||
@export(__atomic_store, .{ .name = "__atomic_store", .linkage = linkage });
|
||||
@export(__atomic_exchange, .{ .name = "__atomic_exchange", .linkage = linkage });
|
||||
|
|
|
|||
|
|
@ -1,8 +1,11 @@
|
|||
const std = @import("std");
|
||||
const common = @import("./common.zig");
|
||||
const builtin = @import("builtin");
|
||||
|
||||
comptime {
|
||||
@export(memcpy, .{ .name = "memcpy", .linkage = common.linkage });
|
||||
if (builtin.object_format != .c) {
|
||||
@export(memcpy, .{ .name = "memcpy", .linkage = common.linkage });
|
||||
}
|
||||
}
|
||||
|
||||
pub fn memcpy(noalias dest: ?[*]u8, noalias src: ?[*]const u8, len: usize) callconv(.C) ?[*]u8 {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,12 @@
|
|||
const std = @import("std");
|
||||
const common = @import("./common.zig");
|
||||
const builtin = @import("builtin");
|
||||
|
||||
comptime {
|
||||
@export(memset, .{ .name = "memset", .linkage = common.linkage });
|
||||
@export(__memset, .{ .name = "__memset", .linkage = common.linkage });
|
||||
if (builtin.object_format != .c) {
|
||||
@export(memset, .{ .name = "memset", .linkage = common.linkage });
|
||||
@export(__memset, .{ .name = "__memset", .linkage = common.linkage });
|
||||
}
|
||||
}
|
||||
|
||||
pub fn memset(dest: ?[*]u8, c: u8, len: usize) callconv(.C) ?[*]u8 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue