-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Open
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.linking
Milestone
Description
Related:
- completely eliminate dependency on LLD #8726
- eliminate dependency on LLD for Mach-O #8727
- eliminate dependency on LLD for WebAssembly #17750
- eliminate dependency on LLD for COFF/PE #17751
- ELF linker code crashes instead of reporting malformed archive #18205
Put simply, this issue can be closed when the following diff is applied:
--- a/src/Compilation.zig
+++ b/src/Compilation.zig
@@ -899,15 +899,13 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
// Make a decision on whether to use LLD or our own linker.
const use_lld = options.use_lld orelse blk: {
- if (options.target.isDarwin()) {
- break :blk false;
- }
-
if (!build_options.have_llvm)
break :blk false;
- if (options.target.ofmt == .c)
- break :blk false;
+ switch (options.target.ofmt) {
+ .c, .macho, .elf => break :blk false,
+ else => {},
+ }
if (options.want_lto) |lto| {
if (lto) {
lin72h and Aditya925Lucifer-02, plajjan and lin72h
Metadata
Metadata
Assignees
Labels
enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.linking
Type
Projects
Status
Ditch LLVM