[libc-commits] [PATCH] D118889: [libc] Disable rtti/expections

Guillaume Chatelet via Phabricator via libc-commits libc-commits at lists.llvm.org
Tue Feb 8 02:39:09 PST 2022


gchatelet updated this revision to Diff 406748.
gchatelet added a comment.

Remove XL compiler flags and rebase


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118889/new/

https://reviews.llvm.org/D118889

Files:
  libc/cmake/modules/LLVMLibCObjectRules.cmake


Index: libc/cmake/modules/LLVMLibCObjectRules.cmake
===================================================================
--- libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -5,6 +5,15 @@
   if(NOT ${LIBC_TARGET_OS} STREQUAL "windows")
     set(compile_options ${compile_options} -fpie -ffreestanding)
   endif()
+  if(LLVM_COMPILER_IS_GCC_COMPATIBLE)
+    list(APPEND compile_options "-fno-exceptions")
+    list(APPEND compile_options "-fno-unwind-tables")
+    list(APPEND compile_options "-fno-asynchronous-unwind-tables")
+    list(APPEND compile_options "-fno-rtti")
+  elseif(MSVC)
+    list(APPEND compile_options "/EHs-c-")
+    list(APPEND compile_options "/GR-")
+  endif()
   set(${output_var} ${compile_options} PARENT_SCOPE)
 endfunction()
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118889.406748.patch
Type: text/x-patch
Size: 803 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220208/6569b530/attachment.bin>


More information about the libc-commits mailing list