Commit d862bf2
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 d0fa608 commit d862bf2
File tree
6 files changed
+26
-30
lines changed- deps/LIEF
- src
- COFF
- PE
- LoadConfigurations
- debug
6 files changed
+26
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | 456 | | |
463 | | - | |
464 | 457 | | |
465 | 458 | | |
466 | 459 | | |
| |||
473 | 466 | | |
474 | 467 | | |
475 | 468 | | |
476 | | - | |
477 | 469 | | |
478 | 470 | | |
479 | 471 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
917 | 917 | | |
918 | 918 | | |
919 | 919 | | |
920 | | - | |
| 920 | + | |
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
| |||
| 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 | |
|---|---|---|---|
| |||
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
| |||
| 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