Skip to content

Commit 872e46a

Browse files
author
Siva Chandra Reddy
committed
[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
1 parent b5b6896 commit 872e46a

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

libc/cmake/modules/LLVMLibCTestRules.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ function(add_integration_test test_name)
513513
${LIBC_BUILD_DIR}/include
514514
)
515515
target_compile_options(${fq_build_target_name}
516-
PRIVATE -fpie -ffreestanding ${INTEGRATION_TEST_COMPILE_OPTIONS})
516+
PRIVATE -fpie -ffreestanding -fno-exceptions -fno-rtti ${INTEGRATION_TEST_COMPILE_OPTIONS})
517517
# The GPU build requires overriding the default CMake triple and architecture.
518518
if(LIBC_GPU_TARGET_ARCHITECTURE_IS_AMDGPU)
519519
target_compile_options(${fq_build_target_name} PRIVATE

libc/test/integration/src/pthread/pthread_create_test.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,8 @@ static void *successThread(void *Arg) {
103103

104104
{
105105
// Allocate some bytes on the stack on most of the stack and make sure we
106-
// have read/write permissions on the memory. -EXEC_PAGESIZE / 2 just as a
107-
// buffer so we don't go beyond our limits (no nested function calls / not
108-
// much other data on the stack so should be enough).
109-
size_t test_stacksize = expec_stacksize - EXEC_PAGESIZE / 2;
106+
// have read/write permissions on the memory.
107+
size_t test_stacksize = expec_stacksize - 1024;
110108
volatile uint8_t *bytes_on_stack =
111109
(volatile uint8_t *)__builtin_alloca(test_stacksize);
112110

0 commit comments

Comments
 (0)