[lld] [lld][WebAssembly] Implement `--start-lib`/`--end-lib` (PR #78821)

Derek Schuff via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 19 17:22:28 PST 2024


================
@@ -375,6 +378,16 @@ void LinkerDriver::createFiles(opt::InputArgList &args) {
     case OPT_no_whole_archive:
       inWholeArchive = false;
       break;
+    case OPT_start_lib:
+      if (inLib)
+        error("nested --start-lib");
+      inLib = true;
+      break;
+    case OPT_end_lib:
+      if (!inLib)
+        error("stray --end-lib");
----------------
dschuff wrote:

```suggestion
        error("--end-lib without matching --start-lib");
```

https://github.com/llvm/llvm-project/pull/78821


More information about the llvm-commits mailing list