Skip to content

eliminate dependency on LLD for WebAssembly #17750

Open

Description

@andrewrk

Related:

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, .wasm => break :blk false,
+                else => {},
+            }
 
             if (options.want_lto) |lto| {
                 if (lto) {

Activity

  1. added
    enhancementSolving this issue will likely involve adding new logic or components to the codebase.
    arch-wasm32-bit and 64-bit WebAssembly
    on Oct 27, 2023
  2. added this to the 0.15.0 milestone on Oct 27, 2023
  3. modified the milestones: 0.16.0, 0.14.0 on Sep 27, 2024
  4. modified the milestones: 0.14.0, 0.15.0 on Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    arch-wasm32-bit and 64-bit WebAssemblyenhancementSolving this issue will likely involve adding new logic or components to the codebase.linking

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions