Merge pull request #25353 from mlugg/x86_64-faster

x86_64: generate better constant memcpy code
This commit is contained in:
Matthew Lugg 2025-09-30 13:28:37 +01:00 committed by GitHub
commit 7adb15892e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 886 additions and 298 deletions

File diff suppressed because it is too large Load Diff

View File

@ -375,11 +375,7 @@ pub fn canBuildLibCompilerRt(target: *const std.Target) enum { no, yes, llvm_onl
else => {},
}
return switch (zigBackend(target, false)) {
.stage2_aarch64 => .yes,
.stage2_x86_64 => switch (target.ofmt) {
.elf, .macho => .yes,
else => .llvm_only,
},
.stage2_aarch64, .stage2_x86_64 => .yes,
else => .llvm_only,
};
}

View File

@ -5,6 +5,7 @@ pub fn build(b: *std.Build) void {
"test-filter",
"Skip tests that do not match any filter",
) orelse &[0][]const u8{};
const strip = b.option(bool, "strip", "Omit debug information");
const compiler_rt_lib = b.addLibrary(.{
.linkage = .static,
@ -171,6 +172,7 @@ pub fn build(b: *std.Build) void {
const test_mod = b.createModule(.{
.root_source_file = b.path(path),
.target = target,
.strip = strip,
});
const test_exe = b.addTest(.{
.name = std.fs.path.stem(path),

View File

@ -1176,6 +1176,7 @@ const test_targets = blk: {
.abi = .musl,
},
.link_libc = true,
.use_llvm = true,
.use_lld = false,
},