Skip to content

Commit

Permalink
build.rs: Sort non-MSVC C compiler flags alphabetically.
Browse files Browse the repository at this point in the history
All the `-W...` flags make do difference in packaged releases,
but `-fvisibility=hidden` is a big deal, so don't hide it after
all the warning stuff.
  • Loading branch information
briansmith committed Oct 15, 2023
1 parent 8909e6e commit 9d4bb22
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ const PREGENERATED: &str = "pregenerated";
fn cpp_flags(compiler: &cc::Tool) -> &'static [&'static str] {
if !compiler.is_like_msvc() {
static NON_MSVC_FLAGS: &[&str] = &[
"-fvisibility=hidden",
"-std=c1x", // GCC 4.6 requires "c1x" instead of "c11"
"-pedantic",
"-Wall",
Expand All @@ -133,7 +134,6 @@ fn cpp_flags(compiler: &cc::Tool) -> &'static [&'static str] {
"-Wundef",
"-Wuninitialized",
"-Wwrite-strings",
"-fvisibility=hidden",
];
NON_MSVC_FLAGS
} else {
Expand Down

0 comments on commit 9d4bb22

Please sign in to comment.