[libc-commits] [PATCH] D151158: [libc] Add -fno-exceptions and -fno-rtti to integration test build.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon May 22 15:10:49 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rG872e46a93e20: [libc] Add -fno-exceptions and -fno-rtti to integration test build. (authored by sivachandra).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D151158

Files:
  libc/cmake/modules/LLVMLibCTestRules.cmake
  libc/test/integration/src/pthread/pthread_create_test.cpp


Index: libc/test/integration/src/pthread/pthread_create_test.cpp
===================================================================
--- libc/test/integration/src/pthread/pthread_create_test.cpp
+++ libc/test/integration/src/pthread/pthread_create_test.cpp
@@ -103,10 +103,8 @@
 
   {
     // Allocate some bytes on the stack on most of the stack and make sure we
-    // have read/write permissions on the memory. -EXEC_PAGESIZE / 2 just as a
-    // buffer so we don't go beyond our limits (no nested function calls / not
-    // much other data on the stack so should be enough).
-    size_t test_stacksize = expec_stacksize - EXEC_PAGESIZE / 2;
+    // have read/write permissions on the memory.
+    size_t test_stacksize = expec_stacksize - 1024;
     volatile uint8_t *bytes_on_stack =
         (volatile uint8_t *)__builtin_alloca(test_stacksize);
 
Index: libc/cmake/modules/LLVMLibCTestRules.cmake
===================================================================
--- libc/cmake/modules/LLVMLibCTestRules.cmake
+++ libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -513,7 +513,7 @@
       ${LIBC_BUILD_DIR}/include
   )
   target_compile_options(${fq_build_target_name}
-                         PRIVATE -fpie -ffreestanding ${INTEGRATION_TEST_COMPILE_OPTIONS})
+      PRIVATE -fpie -ffreestanding -fno-exceptions -fno-rtti ${INTEGRATION_TEST_COMPILE_OPTIONS})
   # The GPU build requires overriding the default CMake triple and architecture.
   if(LIBC_GPU_TARGET_ARCHITECTURE_IS_AMDGPU)
     target_compile_options(${fq_build_target_name} PRIVATE


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151158.524506.patch
Type: text/x-patch
Size: 1557 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230522/e1f01cd2/attachment.bin>


More information about the libc-commits mailing list