[libc-commits] [libc] 872e46a - [libc] Add -fno-exceptions and -fno-rtti to integration test build.

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


Author: Siva Chandra Reddy
Date: 2023-05-22T22:10:36Z
New Revision: 872e46a93e20e081ff5723411cb24556dc3e339b

URL: https://github.com/llvm/llvm-project/commit/872e46a93e20e081ff5723411cb24556dc3e339b
DIFF: https://github.com/llvm/llvm-project/commit/872e46a93e20e081ff5723411cb24556dc3e339b.diff

LOG: [libc] Add -fno-exceptions and -fno-rtti to integration test build.

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

Reviewed By: michaelrj

Differential Revision: https://reviews.llvm.org/D151158

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake
index e1e0f24803a5c..90ffef88ac333 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -513,7 +513,7 @@ function(add_integration_test test_name)
       ${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

diff  --git a/libc/test/integration/src/pthread/pthread_create_test.cpp b/libc/test/integration/src/pthread/pthread_create_test.cpp
index df9a3c8fd7762..20a1139efbfa1 100644
--- a/libc/test/integration/src/pthread/pthread_create_test.cpp
+++ b/libc/test/integration/src/pthread/pthread_create_test.cpp
@@ -103,10 +103,8 @@ static void *successThread(void *Arg) {
 
   {
     // 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);
 


        


More information about the libc-commits mailing list