Skip to content

Commit 5e6babe

Browse files
authored
fix(build): add C++17 and MSVC warning suppressions (#1354)
2 parents 1c8ba42 + 214196f commit 5e6babe

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

crates/engine_xetex/build.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,13 @@ fn main() {
125125
if target.contains("-msvc") {
126126
c_cfg.flag("/EHsc");
127127
cxx_cfg.flag("/EHsc");
128+
cxx_cfg.flag("/std:c++17");
129+
// Disable noisy warnings that are enabled by -Wall
130+
cxx_cfg.flag("/wd4514"); // unreferenced inline function has been removed
131+
cxx_cfg.flag("/wd5045"); // Spectre mitigation insertion (informational)
132+
cxx_cfg.flag("/wd4820"); // padding added after data member
133+
cxx_cfg.flag("/wd4244"); // conversion from 'type1' to 'type2', possible loss of data
134+
cxx_cfg.flag("/wd4365"); // conversion from 'type1' to 'type2', signed/unsigned mismatch
128135
}
129136

130137
// OK, back to generic build rules.

0 commit comments

Comments
 (0)