Skip to content

Commit cfa6f51

Browse files
authored
Update fmt to 11.1.0 (#2290)
* Update libclang to 19.1.5 for binding generator * Update fmt to 11.1.0 Relative Changes: - Control llvm version in build.profiles - Update emsdk to 3.1.73 - Disable Console::listenOnTCP for platform:emscripten
1 parent f9d536e commit cfa6f51

File tree

23 files changed

+4270
-4448
lines changed

23 files changed

+4270
-4448
lines changed

1k/build.profiles

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ nuget=5.5.1.*
2626
# The visual studio version, @axmol-cmdline @verify
2727
vs=17.0+
2828

29+
llvm=17.0.6~19.1.6+
30+
2931
# --- endregion
3032

3133
# region platform:android
@@ -71,6 +73,6 @@ android-studio=2024.2.1+
7173

7274
# --- region platform:wasm
7375

74-
emsdk=3.1.66~3.1.67
76+
emsdk=3.1.66~3.1.73
7577

7678
# --- endregion

1k/manifest.ps1

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ if ($Global:is_axmol_app -or $Global:is_axmol_engine) {
2424
$manifest['cmake'] = $build_profiles['cmake']
2525

2626
$manifest['vs'] = $build_profiles['vs']
27+
$manifest['llvm'] = $build_profiles['llvm']
2728

2829
# android sdk tools
2930
$android_sdk_tools['build-tools'] = $build_profiles['build-tools']

3rdparty/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767

6868
## {fmt}
6969
- [![Upstream](https://img.shields.io/github/v/release/fmtlib/fmt?label=Upstream)](https://github.com/fmtlib/fmt)
70-
- Version: 11.0.2
70+
- Version: 11.1.0
7171

7272
- License: MIT
7373

3rdparty/fmt/CMakeLists.txt

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,13 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
240240
endif ()
241241
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
242242
set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wshift-overflow=2
243-
-Wnull-dereference -Wduplicated-cond)
243+
-Wduplicated-cond)
244+
# Workaround for GCC regression
245+
# [12/13/14/15 regression] New (since gcc 12) false positive null-dereference in vector.resize
246+
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108860
247+
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.0)
248+
set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wnull-dereference)
249+
endif ()
244250
endif ()
245251
set(WERROR_FLAG -Werror)
246252
endif ()
@@ -319,7 +325,7 @@ else ()
319325
message(WARNING "Feature cxx_std_11 is unknown for the CXX compiler")
320326
endif ()
321327

322-
target_include_directories(fmt ${FMT_SYSTEM_HEADERS_ATTRIBUTE} PUBLIC
328+
target_include_directories(fmt ${FMT_SYSTEM_HEADERS_ATTRIBUTE} BEFORE PUBLIC
323329
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
324330
$<INSTALL_INTERFACE:${FMT_INC_DIR}>)
325331

@@ -359,8 +365,8 @@ if (NOT MSVC)
359365
# Unicode is always supported on compilers other than MSVC.
360366
elseif (FMT_UNICODE)
361367
# Unicode support requires compiling with /utf-8.
362-
target_compile_options(fmt PUBLIC $<$<COMPILE_LANGUAGE:CXX>:/utf-8>)
363-
target_compile_options(fmt-header-only INTERFACE $<$<COMPILE_LANGUAGE:CXX>:/utf-8>)
368+
target_compile_options(fmt PUBLIC $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:MSVC>>:/utf-8>)
369+
target_compile_options(fmt-header-only INTERFACE $<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:MSVC>>:/utf-8>)
364370
else ()
365371
target_compile_definitions(fmt PUBLIC FMT_UNICODE=0)
366372
endif ()
@@ -369,7 +375,7 @@ target_compile_definitions(fmt-header-only INTERFACE FMT_HEADER_ONLY=1)
369375
target_compile_features(fmt-header-only INTERFACE cxx_std_11)
370376

371377
target_include_directories(fmt-header-only
372-
${FMT_SYSTEM_HEADERS_ATTRIBUTE} INTERFACE
378+
${FMT_SYSTEM_HEADERS_ATTRIBUTE} BEFORE INTERFACE
373379
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
374380
$<INSTALL_INTERFACE:${FMT_INC_DIR}>)
375381

3rdparty/fmt/ChangeLog.md

Lines changed: 229 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,229 @@
1+
# 11.1.0 - 2024-12-25
2+
3+
- Improved C++20 module support
4+
(https://github.com/fmtlib/fmt/issues/4081,
5+
https://github.com/fmtlib/fmt/pull/4083,
6+
https://github.com/fmtlib/fmt/pull/4084,
7+
https://github.com/fmtlib/fmt/pull/4152,
8+
https://github.com/fmtlib/fmt/issues/4153,
9+
https://github.com/fmtlib/fmt/pull/4169,
10+
https://github.com/fmtlib/fmt/issues/4190,
11+
https://github.com/fmtlib/fmt/issues/4234,
12+
https://github.com/fmtlib/fmt/pull/4239).
13+
Thanks @kamrann and @Arghnews.
14+
15+
- Reduced debug (unoptimized) binary code size and the number of template
16+
instantiations when passing formatting arguments. For example, unoptimized
17+
binary code size for `fmt::print("{}", 42)` was reduced by ~40% on GCC and
18+
~60% on clang (x86-64).
19+
20+
GCC:
21+
- Before: 161 instructions of which 105 are in reusable functions
22+
([godbolt](https://www.godbolt.org/z/s9bGoo4ze)).
23+
- After: 116 instructions of which 60 are in reusable functions
24+
([godbolt](https://www.godbolt.org/z/r7GGGxMs6)).
25+
26+
Clang:
27+
- Before: 310 instructions of which 251 are in reusable functions
28+
([godbolt](https://www.godbolt.org/z/Ts88b7M9o)).
29+
- After: 194 instructions of which 135 are in reusable functions
30+
([godbolt](https://www.godbolt.org/z/vcrjP8ceW)).
31+
32+
- Added an experimental `fmt::writer` API that can be used for writing to
33+
different destinations such as files or strings
34+
(https://github.com/fmtlib/fmt/issues/2354).
35+
For example ([godbolt](https://www.godbolt.org/z/rWoKfbP7e)):
36+
37+
```c++
38+
#include <fmt/os.h>
39+
40+
void write_text(fmt::writer w) {
41+
w.print("The answer is {}.", 42);
42+
}
43+
44+
int main() {
45+
// Write to FILE.
46+
write_text(stdout);
47+
48+
// Write to fmt::ostream.
49+
auto f = fmt::output_file("myfile");
50+
write_text(f);
51+
52+
// Write to std::string.
53+
auto sb = fmt::string_buffer();
54+
write_text(sb);
55+
std::string s = sb.str();
56+
}
57+
```
58+
59+
- Added width and alignment support to the formatter of `std::error_code`.
60+
61+
- Made `std::expected<void, E>` formattable
62+
(https://github.com/fmtlib/fmt/issues/4145,
63+
https://github.com/fmtlib/fmt/pull/4148).
64+
For example ([godbolt](https://www.godbolt.org/z/hrj5c6G86)):
65+
66+
```c++
67+
fmt::print("{}", std::expected<void, int>());
68+
```
69+
70+
prints
71+
72+
```
73+
expected()
74+
```
75+
76+
Thanks @phprus.
77+
78+
- Made `fmt::is_formattable<void>` SFINAE-friendly
79+
(https://github.com/fmtlib/fmt/issues/4147).
80+
81+
- Added support for `_BitInt` formatting when using clang
82+
(https://github.com/fmtlib/fmt/issues/4007,
83+
https://github.com/fmtlib/fmt/pull/4072,
84+
https://github.com/fmtlib/fmt/issues/4140,
85+
https://github.com/fmtlib/fmt/issues/4173,
86+
https://github.com/fmtlib/fmt/pull/4176).
87+
For example ([godbolt](https://www.godbolt.org/z/KWjbWec5z)):
88+
89+
```c++
90+
using int42 = _BitInt(42);
91+
fmt::print("{}", int42(100));
92+
```
93+
94+
Thanks @Arghnews.
95+
96+
- Added the `n` specifier for tuples and pairs
97+
(https://github.com/fmtlib/fmt/pull/4107). Thanks @someonewithpc.
98+
99+
- Added support for tuple-like types to `fmt::join`
100+
(https://github.com/fmtlib/fmt/issues/4226,
101+
https://github.com/fmtlib/fmt/pull/4230). Thanks @phprus.
102+
103+
- Made more types formattable at compile time
104+
(https://github.com/fmtlib/fmt/pull/4127). Thanks @AnthonyVH.
105+
106+
- Implemented a more efficient compile-time `fmt::formatted_size`
107+
(https://github.com/fmtlib/fmt/issues/4102,
108+
https://github.com/fmtlib/fmt/pull/4103). Thanks @phprus.
109+
110+
- Fixed compile-time formatting of some string types
111+
(https://github.com/fmtlib/fmt/pull/4065). Thanks @torshepherd.
112+
113+
- Made compiled version of `fmt::format_to` work with
114+
`std::back_insert_iterator<std::vector<char>>`
115+
(https://github.com/fmtlib/fmt/issues/4206,
116+
https://github.com/fmtlib/fmt/pull/4211). Thanks @phprus.
117+
118+
- Added a formatter for `std::reference_wrapper`
119+
(https://github.com/fmtlib/fmt/pull/4163,
120+
https://github.com/fmtlib/fmt/pull/4164). Thanks @yfeldblum and @phprus.
121+
122+
- Added experimental padding support (glibc `strftime` extension) to `%m`, `%j`
123+
and `%Y` (https://github.com/fmtlib/fmt/pull/4161). Thanks @KKhanhH.
124+
125+
- Made microseconds formatted as `us` instead of `µs` if the Unicode support is
126+
disabled (https://github.com/fmtlib/fmt/issues/4088).
127+
128+
- Fixed an unreleased regression in transcoding of surrogate pairs
129+
(https://github.com/fmtlib/fmt/issues/4094,
130+
https://github.com/fmtlib/fmt/pull/4095). Thanks @phprus.
131+
132+
- Made `fmt::appender` satisfy `std::output_iterator` concept
133+
(https://github.com/fmtlib/fmt/issues/4092,
134+
https://github.com/fmtlib/fmt/pull/4093). Thanks @phprus.
135+
136+
- Made `std::iterator_traits<fmt::appender>` standard-conforming
137+
(https://github.com/fmtlib/fmt/pull/4185). Thanks @CaseyCarter.
138+
139+
- Made it easier to reuse `fmt::formatter<std::string_view>` for types with
140+
an implicit conversion to `std::string_view`
141+
(https://github.com/fmtlib/fmt/issues/4036,
142+
https://github.com/fmtlib/fmt/pull/4055). Thanks @Arghnews.
143+
144+
- Made it possible to disable `<filesystem>` use via `FMT_CPP_LIB_FILESYSTEM`
145+
for compatibility with some video game console SDKs, e.g. Nintendo Switch SDK
146+
(https://github.com/fmtlib/fmt/issues/4257,
147+
https://github.com/fmtlib/fmt/pull/4258,
148+
https://github.com/fmtlib/fmt/pull/4259). Thanks @W4RH4WK and @phprus.
149+
150+
- Fixed compatibility with platforms that use 80-bit `long double`
151+
(https://github.com/fmtlib/fmt/issues/4245,
152+
https://github.com/fmtlib/fmt/pull/4246). Thanks @jsirpoma.
153+
154+
- Added support for UTF-32 code units greater than `0xFFFF` in fill
155+
(https://github.com/fmtlib/fmt/issues/4201).
156+
157+
- Fixed handling of legacy encodings on Windows with GCC
158+
(https://github.com/fmtlib/fmt/issues/4162).
159+
160+
- Made `fmt::to_string` take `fmt::basic_memory_buffer` by const reference
161+
(https://github.com/fmtlib/fmt/issues/4261,
162+
https://github.com/fmtlib/fmt/pull/4262). Thanks @sascha-devel.
163+
164+
- Added `fmt::dynamic_format_arg_store::size`
165+
(https://github.com/fmtlib/fmt/pull/4270). Thanks @hannes-harnisch.
166+
167+
- Removed the ability to control locale usage via an undocumented
168+
`FMT_STATIC_THOUSANDS_SEPARATOR` in favor of `FMT_USE_LOCALE`.
169+
170+
- Renamed `FMT_EXCEPTIONS` to `FMT_USE_EXCEPTIONS` for consistency with other
171+
similar macros.
172+
173+
- Improved include directory ordering to reduce the chance of including
174+
incorrect headers when using multiple versions of {fmt}
175+
(https://github.com/fmtlib/fmt/pull/4116). Thanks @cdzhan.
176+
177+
- Made it possible to compile a subset of {fmt} without the C++ runtime.
178+
179+
- Improved documentation and README
180+
(https://github.com/fmtlib/fmt/pull/4066,
181+
https://github.com/fmtlib/fmt/issues/4117,
182+
https://github.com/fmtlib/fmt/issues/4203,
183+
https://github.com/fmtlib/fmt/pull/4235). Thanks @zyctree and @nikola-sh.
184+
185+
- Improved the documentation generator (https://github.com/fmtlib/fmt/pull/4110,
186+
https://github.com/fmtlib/fmt/pull/4115). Thanks @rturrado.
187+
188+
- Improved CI (https://github.com/fmtlib/fmt/pull/4155,
189+
https://github.com/fmtlib/fmt/pull/4151). Thanks @phprus.
190+
191+
- Fixed various warnings and compilation issues
192+
(https://github.com/fmtlib/fmt/issues/2708,
193+
https://github.com/fmtlib/fmt/issues/4091,
194+
https://github.com/fmtlib/fmt/issues/4109,
195+
https://github.com/fmtlib/fmt/issues/4113,
196+
https://github.com/fmtlib/fmt/issues/4125,
197+
https://github.com/fmtlib/fmt/issues/4129,
198+
https://github.com/fmtlib/fmt/pull/4130,
199+
https://github.com/fmtlib/fmt/pull/4131,
200+
https://github.com/fmtlib/fmt/pull/4132,
201+
https://github.com/fmtlib/fmt/issues/4133,
202+
https://github.com/fmtlib/fmt/issues/4144,
203+
https://github.com/fmtlib/fmt/issues/4150,
204+
https://github.com/fmtlib/fmt/issues/4158,
205+
https://github.com/fmtlib/fmt/pull/4159,
206+
https://github.com/fmtlib/fmt/issues/4160,
207+
https://github.com/fmtlib/fmt/pull/4170,
208+
https://github.com/fmtlib/fmt/issues/4177,
209+
https://github.com/fmtlib/fmt/pull/4187,
210+
https://github.com/fmtlib/fmt/pull/4188,
211+
https://github.com/fmtlib/fmt/pull/4194,
212+
https://github.com/fmtlib/fmt/pull/4200,
213+
https://github.com/fmtlib/fmt/issues/4205,
214+
https://github.com/fmtlib/fmt/issues/4207,
215+
https://github.com/fmtlib/fmt/pull/4208,
216+
https://github.com/fmtlib/fmt/pull/4210,
217+
https://github.com/fmtlib/fmt/issues/4220,
218+
https://github.com/fmtlib/fmt/issues/4231,
219+
https://github.com/fmtlib/fmt/issues/4232,
220+
https://github.com/fmtlib/fmt/pull/4233,
221+
https://github.com/fmtlib/fmt/pull/4236,
222+
https://github.com/fmtlib/fmt/pull/4267,
223+
https://github.com/fmtlib/fmt/pull/4271).
224+
Thanks @torsten48, @Arghnews, @tinfoilboy, @aminya, @Ottani, @zeroomega,
225+
@c4v4, @kongy, @vinayyadav3016, @sergio-nsk, @phprus and @YexuanXiao.
226+
1227
# 11.0.2 - 2024-07-20
2228
3229
- Fixed compatibility with non-POSIX systems
@@ -268,6 +494,9 @@
268494
- Fixed handling of negative ids in `fmt::basic_format_args::get`
269495
(https://github.com/fmtlib/fmt/pull/3945). Thanks @marlenecota.
270496
497+
- Fixed handling of a buffer boundary on flush
498+
(https://github.com/fmtlib/fmt/issues/4229).
499+
271500
- Improved named argument validation
272501
(https://github.com/fmtlib/fmt/issues/3817).
273502

3rdparty/fmt/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@ converts to `std::print`.)
291291
- [ccache](https://ccache.dev/): a compiler cache
292292
- [ClickHouse](https://github.com/ClickHouse/ClickHouse): an
293293
analytical database management system
294+
- [ContextVision](https://www.contextvision.com/): medical imaging software
294295
- [Contour](https://github.com/contour-terminal/contour/): a modern
295296
terminal emulator
296297
- [CUAUV](https://cuauv.org/): Cornell University\'s autonomous

0 commit comments

Comments
 (0)