mirror of
https://github.com/ziglang/zig.git
synced 2025-12-13 09:43:09 +00:00
Merge pull request #25353 from mlugg/x86_64-faster
x86_64: generate better constant memcpy code
This commit is contained in:
commit
7adb15892e
File diff suppressed because it is too large
Load Diff
@ -375,11 +375,7 @@ pub fn canBuildLibCompilerRt(target: *const std.Target) enum { no, yes, llvm_onl
|
|||||||
else => {},
|
else => {},
|
||||||
}
|
}
|
||||||
return switch (zigBackend(target, false)) {
|
return switch (zigBackend(target, false)) {
|
||||||
.stage2_aarch64 => .yes,
|
.stage2_aarch64, .stage2_x86_64 => .yes,
|
||||||
.stage2_x86_64 => switch (target.ofmt) {
|
|
||||||
.elf, .macho => .yes,
|
|
||||||
else => .llvm_only,
|
|
||||||
},
|
|
||||||
else => .llvm_only,
|
else => .llvm_only,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ pub fn build(b: *std.Build) void {
|
|||||||
"test-filter",
|
"test-filter",
|
||||||
"Skip tests that do not match any filter",
|
"Skip tests that do not match any filter",
|
||||||
) orelse &[0][]const u8{};
|
) orelse &[0][]const u8{};
|
||||||
|
const strip = b.option(bool, "strip", "Omit debug information");
|
||||||
|
|
||||||
const compiler_rt_lib = b.addLibrary(.{
|
const compiler_rt_lib = b.addLibrary(.{
|
||||||
.linkage = .static,
|
.linkage = .static,
|
||||||
@ -171,6 +172,7 @@ pub fn build(b: *std.Build) void {
|
|||||||
const test_mod = b.createModule(.{
|
const test_mod = b.createModule(.{
|
||||||
.root_source_file = b.path(path),
|
.root_source_file = b.path(path),
|
||||||
.target = target,
|
.target = target,
|
||||||
|
.strip = strip,
|
||||||
});
|
});
|
||||||
const test_exe = b.addTest(.{
|
const test_exe = b.addTest(.{
|
||||||
.name = std.fs.path.stem(path),
|
.name = std.fs.path.stem(path),
|
||||||
|
|||||||
@ -1176,6 +1176,7 @@ const test_targets = blk: {
|
|||||||
.abi = .musl,
|
.abi = .musl,
|
||||||
},
|
},
|
||||||
.link_libc = true,
|
.link_libc = true,
|
||||||
|
.use_llvm = true,
|
||||||
.use_lld = false,
|
.use_lld = false,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user