File tree Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 11
11
LIBC_TESTS_CAN_USE_MPFR
12
12
${CMAKE_CURRENT_BINARY_DIR}
13
13
SOURCES
14
- ${LIBC_SOURCE_DIR} /utils/MPFRWrapper/check_mpfr.cpp
15
- COMPILE_DEFINITIONS ${LIBC_COMPILE_OPTIONS_DEFAULT}
14
+ ${LIBC_SOURCE_DIR} /utils/MPFRWrapper/check_mpfr.cpp
15
+ COMPILE_DEFINITIONS
16
+ ${LIBC_COMPILE_OPTIONS_DEFAULT}
16
17
LINK_LIBRARIES
17
18
-lmpfr -lgmp -latomic
18
19
)
Original file line number Diff line number Diff line change @@ -19,17 +19,26 @@ function(add_unittest_framework_library name)
19
19
${TEST_LIB_SRCS}
20
20
${TEST_LIB_HDRS}
21
21
)
22
- target_include_directories (${lib} PUBLIC ${LIBC_SOURCE_DIR} )
22
+ target_include_directories (${lib} PRIVATE ${LIBC_SOURCE_DIR} )
23
23
if (TARGET libc.src.time.clock )
24
24
target_compile_definitions (${lib} PRIVATE TARGET_SUPPORTS_CLOCK )
25
25
endif ()
26
26
endforeach ()
27
27
28
- _get_common_test_compile_options (compile_options "" "" )
29
- target_compile_options (${name} .unit PRIVATE ${compile_options} )
28
+ if (LLVM_LIBC_FULL_BUILD )
29
+ # TODO: Build test framework with LIBC_FULL_BUILD in full build mode after
30
+ # making LibcFPExceptionHelpers and LibcDeathTestExecutors hermetic.
31
+ set (LLVM_LIBC_FULL_BUILD "" )
32
+ _get_common_test_compile_options (compile_options "" "" )
33
+ target_compile_options (${name} .unit PRIVATE ${compile_options} )
34
+ set (LLVM_LIBC_FULL_BUILD ON )
35
+ else ()
36
+ _get_common_test_compile_options (compile_options "" "" )
37
+ target_compile_options (${name} .unit PRIVATE ${compile_options} )
38
+ endif ()
30
39
31
40
_get_hermetic_test_compile_options (compile_options "" )
32
- target_include_directories (${name} .hermetic PRIVATE ${LIBC_BUILD_DIR} /include )
41
+ target_include_directories (${name} .hermetic PRIVATE ${LIBC_INCLUDE_DIR} )
33
42
target_compile_options (${name} .hermetic PRIVATE ${compile_options} -nostdinc++ )
34
43
35
44
if (TEST_LIB_DEPENDS )
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ function(add_startup_test target_name)
32
32
PRIVATE
33
33
${LIBC_SOURCE_DIR}
34
34
${LIBC_BUILD_DIR}
35
- ${LIBC_BUILD_DIR} /include
35
+ ${LIBC_INCLUDE_DIR}
36
36
)
37
37
38
38
if (ADD_STARTUP_TEST_DEPENDS )
You can’t perform that action at this time.
0 commit comments