[compiler-rt] [libcxx] [llvm] [lldb] [flang] [clang] [clang-tools-extra] [libc] [PowerPC] Support mcmodel=large for AIX (PR #70652)

Chen Zheng via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 31 01:13:15 PDT 2023


================
@@ -5723,16 +5723,14 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
   if (Arg *A = Args.getLastArg(options::OPT_mcmodel_EQ)) {
     StringRef CM = A->getValue();
     bool Ok = false;
-    if (Triple.isOSAIX() && CM == "medium") {
+    if (Triple.isOSAIX() && CM == "medium")
       CM = "large";
-      Ok = true;
-    }
     if (Triple.isAArch64(64)) {
       Ok = CM == "tiny" || CM == "small" || CM == "large";
       if (CM == "large" && RelocationModel != llvm::Reloc::Static)
         D.Diag(diag::err_drv_argument_only_allowed_with)
             << A->getAsString(Args) << "-fno-pic";
-    } else if (Triple.isPPC64()) {
+    } else if (Triple.isPPC64() || Triple.isOSAIX()) {
----------------
chenzheng1030 wrote:

AIX seems good now.
However I think we still have one active ppc32 target like SPE working on PPC. So now clang can not accept any code model for target `-target powerpcspe`.
>From simple testing, this target supports all these three models.

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


More information about the cfe-commits mailing list