[lld] [LLD][COFF] Support /DEPENDENTLOADFLAGS[:flags] (PR #71537)
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 7 15:38:45 PST 2023
================
@@ -265,6 +265,19 @@ void LinkerDriver::parseFunctionPadMin(llvm::opt::Arg *a) {
}
}
+// Parses /dependentloadflag option argument.
+void LinkerDriver::parseDependentLoadFlags(llvm::opt::Arg *a) {
+ StringRef arg = a->getNumValues() ? a->getValue() : "";
+ if (!arg.empty()) {
+ if (arg.getAsInteger(0, ctx.config.dependentLoadFlags))
+ error("/dependentloadflag: invalid argument: " + arg);
+ return;
+ }
+ // MSVC linker reports error "no argument specified", although MSDN describes
+ // argument as optional.
+ error("no argument specified with option '/dependentloadflag'");
----------------
aganea wrote:
I think this error can be made a bit more concise. Also other errors for other flags seem to put the flag in the front: "/dependentloadflag: no argument specified"
https://github.com/llvm/llvm-project/pull/71537
More information about the llvm-commits
mailing list