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

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 19 17:24:45 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");
----------------
sbc100 wrote:

These match the ELF errors, so maybe we should leave them the same for now?  And maybe followup by making them more clear?

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


More information about the llvm-commits mailing list