From ad3c46ebe3e5c103c0265344a2448fb0d9c15742 Mon Sep 17 00:00:00 2001 From: Carson Harmon Date: Mon, 20 Jul 2020 12:05:47 -0400 Subject: [PATCH 1/2] Catch flags for Wall, Werror (does not play nice with our arg injection always) --- polybuild/polybuild.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/polybuild/polybuild.py b/polybuild/polybuild.py index 39df139f..f9990e39 100644 --- a/polybuild/polybuild.py +++ b/polybuild/polybuild.py @@ -160,6 +160,8 @@ def poly_build(self, argv) -> bool: compile_command.append("-I" + self.meta.compiler_dir + "/../cxx_libs/include/c++/v1/") compile_command.append("-L" + self.meta.compiler_dir + "/../cxx_libs/lib/") for arg in argv[1:]: + if arg == "-Wall" or arg == "-Wextra" or arg == "Wno-unused-parameter" or arg == "-Werror": + continue compile_command.append(arg) is_linking = self.poly_is_linking(argv) if is_linking: From 6bdcf5c90bb459fe0ec8a759f952d50c8f687d7a Mon Sep 17 00:00:00 2001 From: Carson Harmon Date: Mon, 20 Jul 2020 12:45:32 -0400 Subject: [PATCH 2/2] Forgot the - for -Wno, thanks Will W :) --- polybuild/polybuild.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/polybuild/polybuild.py b/polybuild/polybuild.py index f9990e39..ec73d852 100644 --- a/polybuild/polybuild.py +++ b/polybuild/polybuild.py @@ -160,7 +160,7 @@ def poly_build(self, argv) -> bool: compile_command.append("-I" + self.meta.compiler_dir + "/../cxx_libs/include/c++/v1/") compile_command.append("-L" + self.meta.compiler_dir + "/../cxx_libs/lib/") for arg in argv[1:]: - if arg == "-Wall" or arg == "-Wextra" or arg == "Wno-unused-parameter" or arg == "-Werror": + if arg == "-Wall" or arg == "-Wextra" or arg == "-Wno-unused-parameter" or arg == "-Werror": continue compile_command.append(arg) is_linking = self.poly_is_linking(argv)