Commit 353748e
committed
build: remove duplicate C++ standard flags from LIEF
LIEF's lief.gyp explicitly sets -std=gnu++17 in cflags_cc and
xcode_settings, while common.gypi already sets -std=gnu++20
project-wide. This results in both flags being passed to the compiler
(-std=gnu++20 -std=gnu++17). Since the last flag wins, LIEF was
silently compiling as C++17 instead of the intended project-wide C++20.
Remove the explicit -std=gnu++17 flags from cflags_cc and
xcode_settings.OTHER_CPLUSPLUSFLAGS, and the msvs_settings
LanguageStandard override (stdcpp17), so LIEF uses the project-wide
C++20 standard.
Additionally, fix LIEF compilation with C++20 by explicitly qualifying
fmt::format and fmt::join in Section.cpp, and converting joined views
into std::string values prior to passing them into final formatting
calls. This prevents conflicts between fmt::join_view and std::format
when compiling under C++20.
Fixes: #621291 parent 9f0a3e6 commit 353748e
3 files changed
+22
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | 457 | | |
464 | | - | |
465 | 458 | | |
466 | 459 | | |
467 | 460 | | |
| |||
474 | 467 | | |
475 | 468 | | |
476 | 469 | | |
477 | | - | |
478 | 470 | | |
479 | 471 | | |
480 | 472 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | 129 | | |
131 | 130 | | |
132 | 131 | | |
| |||
138 | 137 | | |
139 | 138 | | |
140 | 139 | | |
141 | | - | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
142 | 146 | | |
143 | 147 | | |
144 | | - | |
145 | | - | |
| 148 | + | |
| 149 | + | |
146 | 150 | | |
147 | | - | |
148 | | - | |
| 151 | + | |
| 152 | + | |
149 | 153 | | |
150 | 154 | | |
151 | | - | |
152 | | - | |
153 | | - | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
154 | 158 | | |
155 | | - | |
156 | | - | |
157 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
158 | 162 | | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
164 | 168 | | |
165 | 169 | | |
166 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
0 commit comments