[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 14:51:47 PDT 2023


sivachandra created this revision.
sivachandra added reviewers: michaelrj, lntue.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
sivachandra requested review of this revision.

Also adjust pthread_create_test to accomodate large page sizes. Both
these changes should now fix the full build builders.


Repository:
  rG LLVM Github Monorepo

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 - 128;
     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.524497.patch
Type: text/x-patch
Size: 1556 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230522/33687937/attachment-0001.bin>


More information about the libc-commits mailing list