Skip to content

Commit 909bff8

Browse files
authored
gn build: libcxx: Sync file list and always define _LIBCPP_ABI_VERSION.
The CMake side always defines _LIBCPP_ABI_VERSION. If we do not, we will at least get -Wundef warnings in the test suite (upgraded to errors) and it looks like we will end up building the library incorrectly as well. With that, most of the libc++ test suite passes (with a manually written lit.site.cfg) aside from some parts related to C++ modules which we don't support yet. Reviewers: nico, aeubanks Reviewed By: aeubanks Pull Request: #132135
1 parent 0489447 commit 909bff8

File tree

1 file changed

+129
-5
lines changed
  • llvm/utils/gn/secondary/libcxx/include

1 file changed

+129
-5
lines changed

llvm/utils/gn/secondary/libcxx/include/BUILD.gn

+129-5
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ if (current_toolchain == default_toolchain) {
1818
values = [
1919
"_LIBCPP_ABI_FORCE_ITANIUM=",
2020
"_LIBCPP_ABI_FORCE_MICROSOFT=",
21+
"_LIBCPP_ABI_VERSION=$libcxx_abi_version",
2122
"_LIBCPP_EXTRA_SITE_DEFINES=",
2223
"_LIBCPP_HAS_FILESYSTEM=1",
2324
"_LIBCPP_HAS_THREADS=1",
@@ -43,11 +44,6 @@ if (current_toolchain == default_toolchain) {
4344
"_LIBCPP_PSTL_BACKEND_SERIAL=1",
4445
"_LIBCPP_PSTL_BACKEND_STD_THREAD=",
4546
]
46-
if (libcxx_abi_version != 1) {
47-
values += [ "_LIBCPP_ABI_VERSION=$libcxx_abi_version" ]
48-
} else {
49-
values += [ "_LIBCPP_ABI_VERSION=" ]
50-
}
5147
if (libcxx_abi_namespace != "") {
5248
values += [ "_LIBCPP_ABI_NAMESPACE=$libcxx_abi_namespace" ]
5349
} else {
@@ -610,6 +606,7 @@ if (current_toolchain == default_toolchain) {
610606
"__cxx03/__algorithm/unwrap_iter.h",
611607
"__cxx03/__algorithm/unwrap_range.h",
612608
"__cxx03/__algorithm/upper_bound.h",
609+
"__cxx03/__assert",
613610
"__cxx03/__atomic/aliases.h",
614611
"__cxx03/__atomic/atomic.h",
615612
"__cxx03/__atomic/atomic_base.h",
@@ -640,6 +637,7 @@ if (current_toolchain == default_toolchain) {
640637
"__cxx03/__bit/invert_if.h",
641638
"__cxx03/__bit/popcount.h",
642639
"__cxx03/__bit/rotate.h",
640+
"__cxx03/__bit_reference",
643641
"__cxx03/__charconv/chars_format.h",
644642
"__cxx03/__charconv/from_chars_integral.h",
645643
"__cxx03/__charconv/from_chars_result.h",
@@ -720,6 +718,7 @@ if (current_toolchain == default_toolchain) {
720718
"__cxx03/__concepts/swappable.h",
721719
"__cxx03/__concepts/totally_ordered.h",
722720
"__cxx03/__condition_variable/condition_variable.h",
721+
"__cxx03/__config",
723722
"__cxx03/__configuration/abi.h",
724723
"__cxx03/__configuration/availability.h",
725724
"__cxx03/__configuration/compiler.h",
@@ -841,6 +840,7 @@ if (current_toolchain == default_toolchain) {
841840
"__cxx03/__fwd/subrange.h",
842841
"__cxx03/__fwd/tuple.h",
843842
"__cxx03/__fwd/vector.h",
843+
"__cxx03/__hash_table",
844844
"__cxx03/__ios/fpos.h",
845845
"__cxx03/__iterator/access.h",
846846
"__cxx03/__iterator/advance.h",
@@ -885,6 +885,7 @@ if (current_toolchain == default_toolchain) {
885885
"__cxx03/__iterator/sortable.h",
886886
"__cxx03/__iterator/unreachable_sentinel.h",
887887
"__cxx03/__iterator/wrap_iter.h",
888+
"__cxx03/__locale",
888889
"__cxx03/__locale_dir/locale_base_api.h",
889890
"__cxx03/__locale_dir/locale_base_api/android.h",
890891
"__cxx03/__locale_dir/locale_base_api/bsd_locale_defaults.h",
@@ -965,6 +966,7 @@ if (current_toolchain == default_toolchain) {
965966
"__cxx03/__mutex/once_flag.h",
966967
"__cxx03/__mutex/tag_types.h",
967968
"__cxx03/__mutex/unique_lock.h",
969+
"__cxx03/__node_handle",
968970
"__cxx03/__numeric/accumulate.h",
969971
"__cxx03/__numeric/adjacent_difference.h",
970972
"__cxx03/__numeric/exclusive_scan.h",
@@ -1079,6 +1081,8 @@ if (current_toolchain == default_toolchain) {
10791081
"__cxx03/__ranges/view_interface.h",
10801082
"__cxx03/__ranges/views.h",
10811083
"__cxx03/__ranges/zip_view.h",
1084+
"__cxx03/__split_buffer",
1085+
"__cxx03/__std_clang_module",
10821086
"__cxx03/__std_mbstate_t.h",
10831087
"__cxx03/__stop_token/atomic_unique_lock.h",
10841088
"__cxx03/__stop_token/intrusive_list_view.h",
@@ -1113,6 +1117,7 @@ if (current_toolchain == default_toolchain) {
11131117
"__cxx03/__thread/this_thread.h",
11141118
"__cxx03/__thread/thread.h",
11151119
"__cxx03/__thread/timed_backoff_policy.h",
1120+
"__cxx03/__tree",
11161121
"__cxx03/__tuple/find_index.h",
11171122
"__cxx03/__tuple/ignore.h",
11181123
"__cxx03/__tuple/make_tuple_types.h",
@@ -1243,6 +1248,7 @@ if (current_toolchain == default_toolchain) {
12431248
"__cxx03/__type_traits/underlying_type.h",
12441249
"__cxx03/__type_traits/unwrap_ref.h",
12451250
"__cxx03/__type_traits/void_t.h",
1251+
"__cxx03/__undef_macros",
12461252
"__cxx03/__utility/as_const.h",
12471253
"__cxx03/__utility/as_lvalue.h",
12481254
"__cxx03/__utility/auto_cast.h",
@@ -1270,9 +1276,55 @@ if (current_toolchain == default_toolchain) {
12701276
"__cxx03/__utility/to_underlying.h",
12711277
"__cxx03/__utility/unreachable.h",
12721278
"__cxx03/__variant/monostate.h",
1279+
"__cxx03/__verbose_abort",
1280+
"__cxx03/algorithm",
1281+
"__cxx03/any",
1282+
"__cxx03/array",
1283+
"__cxx03/atomic",
1284+
"__cxx03/barrier",
1285+
"__cxx03/bit",
1286+
"__cxx03/bitset",
1287+
"__cxx03/cassert",
1288+
"__cxx03/ccomplex",
1289+
"__cxx03/cctype",
1290+
"__cxx03/cerrno",
1291+
"__cxx03/cfenv",
1292+
"__cxx03/cfloat",
1293+
"__cxx03/charconv",
1294+
"__cxx03/chrono",
1295+
"__cxx03/cinttypes",
1296+
"__cxx03/ciso646",
1297+
"__cxx03/climits",
1298+
"__cxx03/clocale",
1299+
"__cxx03/cmath",
1300+
"__cxx03/codecvt",
1301+
"__cxx03/compare",
1302+
"__cxx03/complex",
12731303
"__cxx03/complex.h",
1304+
"__cxx03/concepts",
1305+
"__cxx03/condition_variable",
1306+
"__cxx03/coroutine",
1307+
"__cxx03/csetjmp",
1308+
"__cxx03/csignal",
1309+
"__cxx03/cstdarg",
1310+
"__cxx03/cstdbool",
1311+
"__cxx03/cstddef",
1312+
"__cxx03/cstdint",
1313+
"__cxx03/cstdio",
1314+
"__cxx03/cstdlib",
1315+
"__cxx03/cstring",
1316+
"__cxx03/ctgmath",
1317+
"__cxx03/ctime",
12741318
"__cxx03/ctype.h",
1319+
"__cxx03/cuchar",
1320+
"__cxx03/cwchar",
1321+
"__cxx03/cwctype",
1322+
"__cxx03/deque",
12751323
"__cxx03/errno.h",
1324+
"__cxx03/exception",
1325+
"__cxx03/execution",
1326+
"__cxx03/expected",
1327+
"__cxx03/experimental/__config",
12761328
"__cxx03/experimental/__simd/aligned_tag.h",
12771329
"__cxx03/experimental/__simd/declaration.h",
12781330
"__cxx03/experimental/__simd/reference.h",
@@ -1282,20 +1334,91 @@ if (current_toolchain == default_toolchain) {
12821334
"__cxx03/experimental/__simd/traits.h",
12831335
"__cxx03/experimental/__simd/utility.h",
12841336
"__cxx03/experimental/__simd/vec_ext.h",
1337+
"__cxx03/experimental/iterator",
1338+
"__cxx03/experimental/memory",
1339+
"__cxx03/experimental/propagate_const",
1340+
"__cxx03/experimental/simd",
1341+
"__cxx03/experimental/type_traits",
1342+
"__cxx03/experimental/utility",
1343+
"__cxx03/ext/__hash",
1344+
"__cxx03/ext/hash_map",
1345+
"__cxx03/ext/hash_set",
12851346
"__cxx03/fenv.h",
1347+
"__cxx03/filesystem",
12861348
"__cxx03/float.h",
1349+
"__cxx03/format",
1350+
"__cxx03/forward_list",
1351+
"__cxx03/fstream",
1352+
"__cxx03/functional",
1353+
"__cxx03/future",
1354+
"__cxx03/initializer_list",
12871355
"__cxx03/inttypes.h",
1356+
"__cxx03/iomanip",
1357+
"__cxx03/ios",
1358+
"__cxx03/iosfwd",
1359+
"__cxx03/iostream",
1360+
"__cxx03/istream",
1361+
"__cxx03/iterator",
1362+
"__cxx03/latch",
1363+
"__cxx03/limits",
1364+
"__cxx03/list",
1365+
"__cxx03/locale",
12881366
"__cxx03/locale.h",
1367+
"__cxx03/map",
12891368
"__cxx03/math.h",
1369+
"__cxx03/mdspan",
1370+
"__cxx03/memory",
1371+
"__cxx03/memory_resource",
1372+
"__cxx03/module.modulemap",
1373+
"__cxx03/mutex",
1374+
"__cxx03/new",
1375+
"__cxx03/numbers",
1376+
"__cxx03/numeric",
1377+
"__cxx03/optional",
1378+
"__cxx03/ostream",
1379+
"__cxx03/print",
1380+
"__cxx03/queue",
1381+
"__cxx03/random",
1382+
"__cxx03/ranges",
1383+
"__cxx03/ratio",
1384+
"__cxx03/regex",
1385+
"__cxx03/scoped_allocator",
1386+
"__cxx03/semaphore",
1387+
"__cxx03/set",
1388+
"__cxx03/shared_mutex",
1389+
"__cxx03/source_location",
1390+
"__cxx03/span",
1391+
"__cxx03/sstream",
1392+
"__cxx03/stack",
12901393
"__cxx03/stdatomic.h",
12911394
"__cxx03/stdbool.h",
12921395
"__cxx03/stddef.h",
1396+
"__cxx03/stdexcept",
12931397
"__cxx03/stdint.h",
12941398
"__cxx03/stdio.h",
12951399
"__cxx03/stdlib.h",
1400+
"__cxx03/stop_token",
1401+
"__cxx03/streambuf",
1402+
"__cxx03/string",
12961403
"__cxx03/string.h",
1404+
"__cxx03/string_view",
1405+
"__cxx03/strstream",
1406+
"__cxx03/syncstream",
1407+
"__cxx03/system_error",
12971408
"__cxx03/tgmath.h",
1409+
"__cxx03/thread",
1410+
"__cxx03/tuple",
1411+
"__cxx03/type_traits",
1412+
"__cxx03/typeindex",
1413+
"__cxx03/typeinfo",
12981414
"__cxx03/uchar.h",
1415+
"__cxx03/unordered_map",
1416+
"__cxx03/unordered_set",
1417+
"__cxx03/utility",
1418+
"__cxx03/valarray",
1419+
"__cxx03/variant",
1420+
"__cxx03/vector",
1421+
"__cxx03/version",
12991422
"__cxx03/wchar.h",
13001423
"__cxx03/wctype.h",
13011424
"__debug_utils/randomize_range.h",
@@ -1955,6 +2078,7 @@ if (current_toolchain == default_toolchain) {
19552078
"ext/hash_set",
19562079
"fenv.h",
19572080
"filesystem",
2081+
"flat_map",
19582082
"float.h",
19592083
"format",
19602084
"forward_list",

0 commit comments

Comments
 (0)