aboutsummaryrefslogtreecommitdiff
path: root/libcxx/utils
diff options
context:
space:
mode:
authorMark de Wever <koraq@xs4all.nl>2021-07-25 09:18:53 +0200
committerMark de Wever <koraq@xs4all.nl>2021-07-27 22:37:35 +0200
commit71909de37495c82e31ae3a59f366f48e8fb66e54 (patch)
treefb3e58a777ce476dc4c1c2abc8dad8502c671894 /libcxx/utils
parentd1c7a57fe8e051aa7886a7d4052627f6bc4a4ae6 (diff)
downloadllvm-71909de37495c82e31ae3a59f366f48e8fb66e54.zip
llvm-71909de37495c82e31ae3a59f366f48e8fb66e54.tar.gz
llvm-71909de37495c82e31ae3a59f366f48e8fb66e54.tar.bz2
[libc++] Disable incomplete library features.
Adds a new CMake option to disable the usage of incomplete headers. These incomplete headers are not guaranteed to be ABI stable. This option is intended to be used by vendors so they can avoid their users from code that's not ready for production usage. The option is enabled by default. Differential Revision: https://reviews.llvm.org/D106763
Diffstat (limited to 'libcxx/utils')
-rwxr-xr-xlibcxx/utils/generate_feature_test_macro_components.py2
-rwxr-xr-xlibcxx/utils/generate_header_inclusion_tests.py2
-rwxr-xr-xlibcxx/utils/generate_header_tests.py2
-rw-r--r--libcxx/utils/libcxx/test/features.py2
4 files changed, 8 insertions, 0 deletions
diff --git a/libcxx/utils/generate_feature_test_macro_components.py b/libcxx/utils/generate_feature_test_macro_components.py
index 78b124e..9fb740f 100755
--- a/libcxx/utils/generate_feature_test_macro_components.py
+++ b/libcxx/utils/generate_feature_test_macro_components.py
@@ -684,11 +684,13 @@ lit_markup = {
"atomic": ["UNSUPPORTED: libcpp-has-no-threads"],
"barrier": ["UNSUPPORTED: libcpp-has-no-threads"],
"filesystem": ["UNSUPPORTED: libcpp-has-no-filesystem-library"],
+ "format": ["UNSUPPORTED: libcpp-has-no-incomplete-format"],
"iomanip": ["UNSUPPORTED: libcpp-has-no-localization"],
"istream": ["UNSUPPORTED: libcpp-has-no-localization"],
"latch": ["UNSUPPORTED: libcpp-has-no-threads"],
"locale": ["UNSUPPORTED: libcpp-has-no-localization"],
"ostream": ["UNSUPPORTED: libcpp-has-no-localization"],
+ "ranges": ["UNSUPPORTED: libcpp-has-no-incomplete-ranges"],
"regex": ["UNSUPPORTED: libcpp-has-no-localization"],
"semaphore": ["UNSUPPORTED: libcpp-has-no-threads"],
"shared_mutex": ["UNSUPPORTED: libcpp-has-no-threads"],
diff --git a/libcxx/utils/generate_header_inclusion_tests.py b/libcxx/utils/generate_header_inclusion_tests.py
index 89cd67d..7b5a2db 100755
--- a/libcxx/utils/generate_header_inclusion_tests.py
+++ b/libcxx/utils/generate_header_inclusion_tests.py
@@ -93,6 +93,7 @@ lit_markup = {
"atomic": ["UNSUPPORTED: libcpp-has-no-threads"],
"barrier": ["UNSUPPORTED: libcpp-has-no-threads"],
"filesystem": ["UNSUPPORTED: libcpp-has-no-filesystem-library"],
+ "format": ["UNSUPPORTED: libcpp-has-no-incomplete-format"],
"iomanip": ["UNSUPPORTED: libcpp-has-no-localization"],
"ios": ["UNSUPPORTED: libcpp-has-no-localization"],
"iostream": ["UNSUPPORTED: libcpp-has-no-localization"],
@@ -100,6 +101,7 @@ lit_markup = {
"latch": ["UNSUPPORTED: libcpp-has-no-threads"],
"locale": ["UNSUPPORTED: libcpp-has-no-localization"],
"ostream": ["UNSUPPORTED: libcpp-has-no-localization"],
+ "ranges": ["UNSUPPORTED: libcpp-has-no-incomplete-ranges"],
"regex": ["UNSUPPORTED: libcpp-has-no-localization"],
"semaphore": ["UNSUPPORTED: libcpp-has-no-threads"],
"shared_mutex": ["UNSUPPORTED: libcpp-has-no-threads"],
diff --git a/libcxx/utils/generate_header_tests.py b/libcxx/utils/generate_header_tests.py
index 5236350..e081914 100755
--- a/libcxx/utils/generate_header_tests.py
+++ b/libcxx/utils/generate_header_tests.py
@@ -32,6 +32,7 @@ header_markup = {
"experimental/filesystem": ["ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY"],
"filesystem": ["ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY"],
+ "format": ["ifndef _LIBCPP_HAS_NO_INCOMPLETE_FORMAT"],
"clocale": ["ifndef _LIBCPP_HAS_NO_LOCALIZATION"],
"codecvt": ["ifndef _LIBCPP_HAS_NO_LOCALIZATION"],
@@ -43,6 +44,7 @@ header_markup = {
"locale.h": ["ifndef _LIBCPP_HAS_NO_LOCALIZATION"],
"locale": ["ifndef _LIBCPP_HAS_NO_LOCALIZATION"],
"ostream": ["ifndef _LIBCPP_HAS_NO_LOCALIZATION"],
+ "ranges": ["ifndef _LIBCPP_HAS_NO_INCOMPLETE_RANGES"],
"regex": ["ifndef _LIBCPP_HAS_NO_LOCALIZATION"],
"sstream": ["ifndef _LIBCPP_HAS_NO_LOCALIZATION"],
"streambuf": ["ifndef _LIBCPP_HAS_NO_LOCALIZATION"],
diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py
index d9b092c..09afe20 100644
--- a/libcxx/utils/libcxx/test/features.py
+++ b/libcxx/utils/libcxx/test/features.py
@@ -104,6 +104,8 @@ macros = {
'_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY': 'libcpp-has-no-filesystem-library',
'_LIBCPP_HAS_NO_RANDOM_DEVICE': 'libcpp-has-no-random-device',
'_LIBCPP_HAS_NO_LOCALIZATION': 'libcpp-has-no-localization',
+ '_LIBCPP_HAS_NO_INCOMPLETE_FORMAT': 'libcpp-has-no-incomplete-format',
+ '_LIBCPP_HAS_NO_INCOMPLETE_RANGES': 'libcpp-has-no-incomplete-ranges',
}
for macro, feature in macros.items():
DEFAULT_FEATURES += [