diff --git a/.vscode/settings.json b/.vscode/settings.json index 5a97ba29cee..5312b7ed5b4 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,6 +5,7 @@ "editor.formatOnSave": true, "files.associations": { ".clang-format": "yaml", + "header-units.json": "jsonc", "**/stl/inc/**": "cpp" }, "files.eol": "\r\n", diff --git a/stl/CMakeLists.txt b/stl/CMakeLists.txt index 394f28cd064..6f2686e6de2 100644 --- a/stl/CMakeLists.txt +++ b/stl/CMakeLists.txt @@ -146,6 +146,7 @@ set(HEADERS ${CMAKE_CURRENT_LIST_DIR}/inc/future ${CMAKE_CURRENT_LIST_DIR}/inc/hash_map ${CMAKE_CURRENT_LIST_DIR}/inc/hash_set + ${CMAKE_CURRENT_LIST_DIR}/inc/header-units.json ${CMAKE_CURRENT_LIST_DIR}/inc/initializer_list ${CMAKE_CURRENT_LIST_DIR}/inc/iomanip ${CMAKE_CURRENT_LIST_DIR}/inc/ios diff --git a/stl/inc/header-units.json b/stl/inc/header-units.json new file mode 100644 index 00000000000..cb1ef9efeb5 --- /dev/null +++ b/stl/inc/header-units.json @@ -0,0 +1,149 @@ +// Copyright (c) Microsoft Corporation. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +{ + "Version": "1.0", + "BuildAsHeaderUnits": [ + // "__msvc_all_public_headers.hpp", // for testing, not production + "__msvc_system_error_abi.hpp", + "algorithm", + "any", + "array", + "atomic", + "barrier", + "bit", + "bitset", + // "cassert", // design is permanently incompatible with header units + // "ccomplex", // removed in C++20 + "cctype", + "cerrno", + "cfenv", + "cfloat", + "charconv", + "chrono", + "cinttypes", + // "ciso646", // removed in C++20 + "climits", + "clocale", + "cmath", + "codecvt", + "compare", + "complex", + "concepts", + "condition_variable", + "coroutine", + "csetjmp", + "csignal", + // "cstdalign", // removed in C++20 + "cstdarg", + // "cstdbool", // removed in C++20 + "cstddef", + "cstdint", + "cstdio", + "cstdlib", + "cstring", + // "ctgmath", // removed in C++20 + "ctime", + "cuchar", + "cwchar", + "cwctype", + "deque", + "exception", + "execution", + "filesystem", + "forward_list", + "fstream", + "functional", + "future", + // "hash_map", // non-Standard, will be removed soon + // "hash_set", // non-Standard, will be removed soon + "initializer_list", + "iomanip", + "ios", + "iosfwd", + "iostream", + "iso646.h", + "istream", + "iterator", + "latch", + "limits", + "list", + "locale", + "map", + "memory", + "memory_resource", + "mutex", + "new", + "numbers", + "numeric", + "optional", + "ostream", + "queue", + "random", + "ranges", + "ratio", + "regex", + "scoped_allocator", + "semaphore", + "set", + "shared_mutex", + "span", + "sstream", + "stack", + "stdexcept", + "stop_token", + "streambuf", + "string", + "string_view", + "strstream", + "system_error", + "thread", + "tuple", + "type_traits", + "typeindex", + "typeinfo", + "unordered_map", + "unordered_set", + "use_ansi.h", + "utility", + "valarray", + "variant", + "vector", + "version", + "xatomic.h", + "xatomic_wait.h", + "xbit_ops.h", + "xcall_once.h", + "xcharconv.h", + "xcharconv_ryu.h", + "xcharconv_ryu_tables.h", + "xerrc.h", + "xfacet", + "xfilesystem_abi.h", + "xhash", + "xiosbase", + // "xkeycheck.h", // internal header, provides no machinery, scans for macroized keywords only + "xlocale", + "xlocbuf", + "xlocinfo", + "xlocinfo.h", + "xlocmes", + "xlocmon", + "xlocnum", + "xloctime", + "xmemory", + "xnode_handle.h", + "xpolymorphic_allocator.h", + "xsmf_control.h", + "xstddef", + "xstring", + "xthreads.h", + "xtimec.h", + "xtr1common", + "xtree", + "xutility", + "ymath.h", + "yvals.h", + "yvals_core.h" + ] +}