From 7f8bef1ad7199fb05e58cc6d7a49b64a3c24c757 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 15 Feb 2025 12:59:10 +0200 Subject: [PATCH] Permit more missing b options. Closes #14254. --- mesonbuild/msetup.py | 2 +- unittests/allplatformstests.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mesonbuild/msetup.py b/mesonbuild/msetup.py index e2646f9e13d0..ac0ea7f06c77 100644 --- a/mesonbuild/msetup.py +++ b/mesonbuild/msetup.py @@ -191,7 +191,7 @@ def generate(self, capture: bool = False, vslite_ctx: T.Optional[dict] = None) - def check_unused_options(self, coredata: 'coredata.CoreData', cmd_line_options: T.Any, all_subprojects: T.Any) -> None: pending = coredata.optstore.pending_project_options errlist: T.List[str] = [] - permitted_unknowns = ['b_vscrt', 'b_lto', 'b_lundef'] + permitted_unknowns = ['b_vscrt', 'b_lto', 'b_lundef', 'b_ndebug'] permitlist: T.List[str] = [] for opt in pending: # Due to backwards compatibility setting build options in non-cross diff --git a/unittests/allplatformstests.py b/unittests/allplatformstests.py index 4c878e38a0a0..865b5e34e565 100644 --- a/unittests/allplatformstests.py +++ b/unittests/allplatformstests.py @@ -5138,3 +5138,8 @@ def test_rsp_support(self): 'link', 'lld-link', 'mwldarm', 'mwldeppc', 'optlink', 'xilink', } self.assertEqual(cc.linker.get_accepts_rsp(), has_rsp) + + def test_nonexisting_bargs(self): + testdir = os.path.join(self.unit_test_dir, '117 empty project') + args = ['-Db_ndebug=if_release'] + self.init(testdir, extra_args=args)