File tree 3 files changed +2
-22
lines changed
3 files changed +2
-22
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ set(LLVM_LIBC_MPFR_INSTALL_PATH "" CACHE PATH "Path to where MPFR is installed (
2
2
3
3
if (LLVM_LIBC_MPFR_INSTALL_PATH)
4
4
set (LIBC_TESTS_CAN_USE_MPFR TRUE )
5
- elseif (LIBC_TARGET_OS_IS_GPU)
5
+ elseif (LIBC_TARGET_OS_IS_GPU OR LLVM_LIBC_FULL_BUILD )
6
6
set (LIBC_TESTS_CAN_USE_MPFR FALSE )
7
7
else ()
8
8
try_compile (
Original file line number Diff line number Diff line change @@ -5,12 +5,6 @@ if(LIBC_TESTS_CAN_USE_MPFR)
5
5
mpfr_inc.h
6
6
)
7
7
target_compile_options (libcMPFRWrapper PRIVATE -O3)
8
- if (LLVM_LIBC_FULL_BUILD)
9
- # It is not easy to make libcMPFRWrapper a standalone library because gmp.h may unconditionally
10
- # pull in some STL headers. As a result, targets using this library will need to link against
11
- # C++ and unwind libraries. Since we are using MPFR anyway, we directly specifies the GNU toolchain.
12
- target_link_libraries (libcMPFRWrapper PUBLIC -lstdc++ -lgcc_s)
13
- endif ()
14
8
add_dependencies (
15
9
libcMPFRWrapper
16
10
libc.src.__support.CPP.string_view
@@ -24,6 +18,6 @@ if(LIBC_TESTS_CAN_USE_MPFR)
24
18
target_link_directories (libcMPFRWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH} /lib)
25
19
endif ()
26
20
target_link_libraries (libcMPFRWrapper PUBLIC LibcFPTestHelpers.unit LibcTest.unit mpfr gmp)
27
- elseif (NOT LIBC_TARGET_OS_IS_GPU)
21
+ elseif (NOT LIBC_TARGET_OS_IS_GPU AND NOT LLVM_LIBC_FULL_BUILD )
28
22
message (WARNING "Math tests using MPFR will be skipped." )
29
23
endif ()
Original file line number Diff line number Diff line change 17
17
// MPFR header can be included in manner allowed in that repo.
18
18
#include " CustomMPFRIncluder.h"
19
19
#else
20
-
21
- extern " C" {
22
- #pragma push_macro("__cplusplus")
23
- #if defined(__clang__)
24
- #pragma clang diagnostic push
25
- #pragma clang diagnostic ignored "-Wbuiltin-macro-redefined"
26
- #endif
27
- #undef __cplusplus
28
20
#include < mpfr.h>
29
- #if defined(__clang__)
30
- #pragma clang diagnostic pop
31
- #endif
32
- #pragma pop_macro("__cplusplus")
33
- }
34
-
35
21
#endif
36
22
37
23
#endif // LLVM_LIBC_UTILS_MPFRWRAPPER_MPFR_INC_H
You can’t perform that action at this time.
0 commit comments