[llvm] 5d1f839 - [AIX] Enable large code model when building with clang

David Tenty via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 18 08:05:47 PDT 2020


Author: David Tenty
Date: 2020-09-18T11:03:22-04:00
New Revision: 5d1f8395be94bdf6915ebeb4e51a4290c9497165

URL: https://github.com/llvm/llvm-project/commit/5d1f8395be94bdf6915ebeb4e51a4290c9497165
DIFF: https://github.com/llvm/llvm-project/commit/5d1f8395be94bdf6915ebeb4e51a4290c9497165.diff

LOG: [AIX] Enable large code model when building with clang

Added: 
    

Modified: 
    llvm/cmake/modules/HandleLLVMOptions.cmake

Removed: 
    


################################################################################
diff  --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake
index 679adb4f8c28..09bebaf79be2 100644
--- a/llvm/cmake/modules/HandleLLVMOptions.cmake
+++ b/llvm/cmake/modules/HandleLLVMOptions.cmake
@@ -195,7 +195,7 @@ endif()
 
 if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
   # -fPIC does not enable the large code model for GCC on AIX but does for XL.
-  if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+  if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
     append("-mcmodel=large" CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
   elseif(CMAKE_CXX_COMPILER_ID MATCHES "XL")
     # XL generates a small number of relocations not of the large model, -bbigtoc is needed.


        


More information about the llvm-commits mailing list