From 1277fa00ed8fa8c2b08608dc48a7ae1b10065eec Mon Sep 17 00:00:00 2001 From: Hubert Tong Date: Tue, 6 Aug 2019 15:08:13 +0000 Subject: [PATCH] [CMake] Add mapping for IBM XL -qnoeh and -qnortti Summary: This patch maps in the `-qnoeh` and `-qnortti` options for building with IBM XL compilers. Reviewers: daltenty, xingxue, jasonliu Reviewed By: daltenty Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D65669 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368050 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/modules/AddLLVM.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index fbaaf60210c..daea27bb531 100644 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -28,6 +28,8 @@ function(llvm_update_compile_flags name) elseif(MSVC) list(APPEND LLVM_COMPILE_DEFINITIONS _HAS_EXCEPTIONS=0) list(APPEND LLVM_COMPILE_FLAGS "/EHs-c-") + elseif (CMAKE_CXX_COMPILER_ID MATCHES "XL") + list(APPEND LLVM_COMPILE_FLAGS "-qnoeh") endif() endif() @@ -41,6 +43,8 @@ function(llvm_update_compile_flags name) list(APPEND LLVM_COMPILE_FLAGS "-fno-rtti") elseif (MSVC) list(APPEND LLVM_COMPILE_FLAGS "/GR-") + elseif (CMAKE_CXX_COMPILER_ID MATCHES "XL") + list(APPEND LLVM_COMPILE_FLAGS "-qnortti") endif () elseif(MSVC) list(APPEND LLVM_COMPILE_FLAGS "/GR") -- 2.40.0