From e41732ae1dd3720319ace4c3d719c93fdc22cc21 Mon Sep 17 00:00:00 2001 From: Afnan Enayet Date: Sun, 6 Aug 2023 18:15:28 -0400 Subject: [PATCH] build: Disable extra warnings, std C11 * Disable extra warnings (not relevant for us since it's not our source) * Set the compiler standard to C11. This is just for consistency because otherwise compilers may set a standard arbitrarily, which could cause issues in rare circumstances. --- build.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.rs b/build.rs index 8eba123a..8becd628 100644 --- a/build.rs +++ b/build.rs @@ -105,6 +105,8 @@ fn compile_grammar( .include(include) .files(c_sources) .warnings(false) + .extra_warnings(false) + .flag_if_supported("-std=c11") .try_compile(output_name)?; } @@ -114,6 +116,7 @@ fn compile_grammar( .include(include) .files(cpp_sources) .warnings(false) + .extra_warnings(false) .flag_if_supported("-std=c++14") .try_compile(&format!("{}-cpp-compile-diffsiter", &output_name))?; }