[lld] [lld/mac] Allow -segprot having stricter initprot than maxprot on mac (PR #107269)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 5 08:16:05 PDT 2024
================
@@ -1882,9 +1882,20 @@ bool link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
StringRef segName = arg->getValue(0);
uint32_t maxProt = parseProtection(arg->getValue(1));
uint32_t initProt = parseProtection(arg->getValue(2));
- if (maxProt != initProt && config->arch() != AK_i386)
- error("invalid argument '" + arg->getAsString(args) +
- "': max and init must be the same for non-i386 archs");
+
+ bool allowsDifferentInitAndMaxProt =
+ config->platform() == PLATFORM_MACOS ||
+ config->platform() == PLATFORM_MACCATALYST;
----------------
zmodem wrote:
Maybe there should be a comment here that ios is currently more of a "don't know" than a hard no?
https://github.com/llvm/llvm-project/pull/107269
More information about the llvm-commits
mailing list