![Ed Schouten](/assets/img/avatar_default.png)
One of the aspects of CloudABI is that it aims to help you write code that is thread-safe out of the box. This is very important if you want to write libraries that are easy to reuse. For CloudABI we decided to not provide the thread-unsafe functions. So far this is working out pretty well, as thread-unsafety issues are detected really early on. The following patch adds a knob to libc++, _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS, that can be set to disable thread-unsafe functions that can easily be avoided in practice. The following functions are not thread-safe: - <clocale>: locale handles should be preferred over setlocale(). - <cstdlib>: mbrlen(), mbrtowc() and wcrtomb() should be preferred over their non-restartable counterparts. - <ctime>: asctime(), ctime(), gmtime() and localtime() are not thread-safe. The first two are also deprecated by POSIX. Differential Revision: http://reviews.llvm.org/D8703 Reviewed by: marshall git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@240527 91177308-0d34-0410-b5e6-96231b3b80d8
31 lines
1.7 KiB
INI
31 lines
1.7 KiB
INI
@AUTO_GEN_COMMENT@
|
|
config.cxx_under_test = "@LIBCXX_COMPILER@"
|
|
config.std = "@LIBCXX_STD_VERSION@"
|
|
config.libcxx_src_root = "@LIBCXX_SOURCE_DIR@"
|
|
config.libcxx_obj_root = "@LIBCXX_BINARY_DIR@"
|
|
config.cxx_library_root = "@LIBCXX_LIBRARY_DIR@"
|
|
config.enable_exceptions = "@LIBCXX_ENABLE_EXCEPTIONS@"
|
|
config.enable_rtti = "@LIBCXX_ENABLE_RTTI@"
|
|
config.enable_shared = "@LIBCXX_ENABLE_SHARED@"
|
|
config.enable_32bit = "@LIBCXX_BUILD_32_BITS@"
|
|
config.enable_global_filesystem_namespace = "@LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE@"
|
|
config.enable_stdin = "@LIBCXX_ENABLE_STDIN@"
|
|
config.enable_stdout = "@LIBCXX_ENABLE_STDOUT@"
|
|
config.enable_threads = "@LIBCXX_ENABLE_THREADS@"
|
|
config.enable_thread_unsafe_c_functions = "@LIBCXX_ENABLE_THREAD_UNSAFE_C_FUNCTIONS@"
|
|
config.enable_monotonic_clock = "@LIBCXX_ENABLE_MONOTONIC_CLOCK@"
|
|
config.cxx_abi = "@LIBCXX_CXX_ABI_LIBNAME@"
|
|
config.use_sanitizer = "@LLVM_USE_SANITIZER@"
|
|
config.abi_library_path = "@LIBCXX_CXX_ABI_LIBRARY_PATH@"
|
|
config.configuration_variant = "@LIBCXX_LIT_VARIANT@"
|
|
config.target_triple = "@LIBCXX_TARGET_TRIPLE@"
|
|
config.sysroot = "@LIBCXX_SYSROOT@"
|
|
config.gcc_toolchain = "@LIBCXX_GCC_TOOLCHAIN@"
|
|
config.generate_coverage = "@LIBCXX_GENERATE_COVERAGE@"
|
|
config.target_info = "@LIBCXX_TARGET_INFO@"
|
|
config.executor = "@LIBCXX_EXECUTOR@"
|
|
config.llvm_unwinder = "@LIBCXXABI_USE_LLVM_UNWINDER@"
|
|
|
|
# Let the main config do the real work.
|
|
lit_config.load_config(config, "@LIBCXX_SOURCE_DIR@/test/lit.cfg")
|