summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tenty <daltenty@ibm.com>2020-07-30 08:31:54 -0400
committerDavid Tenty <daltenty@ibm.com>2020-09-18 11:03:22 -0400
commit5d1f8395be94bdf6915ebeb4e51a4290c9497165 (patch)
tree0cd2856a172fdbb4aae48841037740241f61011a
parentc894bfd1f580e5807fc98cc353b0834e0c5ddc21 (diff)
downloadllvm-5d1f8395be94bdf6915ebeb4e51a4290c9497165.tar.gz
[AIX] Enable large code model when building with clang
-rw-r--r--llvm/cmake/modules/HandleLLVMOptions.cmake2
1 files changed, 1 insertions, 1 deletions
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.