From 73b98dbc0f3e6de5dcd11a624675cbcc3d55d2fa Mon Sep 17 00:00:00 2001 From: Brian Smith Date: Sat, 14 Oct 2023 21:04:41 -0700 Subject: [PATCH] build.rs: Sort non-MSVC C compiler flags alphabetically. 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. --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index eb14c7458e..5c328aa35b 100644 --- a/build.rs +++ b/build.rs @@ -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", @@ -133,7 +134,6 @@ fn cpp_flags(compiler: &cc::Tool) -> &'static [&'static str] { "-Wundef", "-Wuninitialized", "-Wwrite-strings", - "-fvisibility=hidden", ]; NON_MSVC_FLAGS } else {