[libcxx][libc] Hand in Hand PoC with from_chars (#91651)
Implements std::from_chars for float and double. The implementation uses LLVM-libc to do the real parsing. Since this is the first time libc++ uses LLVM-libc there is a bit of additional infrastructure code. The patch is based on the [RFC] Project Hand In Hand (LLVM-libc/libc++ code sharing) https://discourse.llvm.org/t/rfc-project-hand-in-hand-llvm-libc-libc-code-sharing/77701
This commit is contained in:
14
runtimes/cmake/Modules/FindLibcCommonUtils.cmake
Normal file
14
runtimes/cmake/Modules/FindLibcCommonUtils.cmake
Normal file
@@ -0,0 +1,14 @@
|
||||
#===--------------------------------------------------------------------===//
|
||||
#
|
||||
# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
# See https://llvm.org/LICENSE.txt for details.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
#
|
||||
#===--------------------------------------------------------------------===//
|
||||
|
||||
add_library(llvm-libc-common-utilities INTERFACE)
|
||||
# TODO: Reorganize the libc shared section so that it can be included without
|
||||
# adding the root "libc" directory to the include path.
|
||||
target_include_directories(llvm-libc-common-utilities INTERFACE ${CMAKE_CURRENT_LIST_DIR}/../../../libc)
|
||||
target_compile_definitions(llvm-libc-common-utilities INTERFACE LIBC_NAMESPACE=__llvm_libc_common_utils)
|
||||
target_compile_features(llvm-libc-common-utilities INTERFACE cxx_std_17)
|
||||
Reference in New Issue
Block a user