From fa4e975e916415a1a82c7aff16f891e761bd17e1 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 7 Nov 2023 23:02:32 +0800 Subject: improve clang-cl has_flags --- xmake/modules/detect/tools/clang_cl/has_flags.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmake/modules/detect/tools/clang_cl/has_flags.lua b/xmake/modules/detect/tools/clang_cl/has_flags.lua index 8b8d1b04d..c919ed4b0 100644 --- a/xmake/modules/detect/tools/clang_cl/has_flags.lua +++ b/xmake/modules/detect/tools/clang_cl/has_flags.lua @@ -79,7 +79,7 @@ function _check_try_running(flags, opt) -- check flags for compiler -- @note we cannot use os.nuldev() as the output file, maybe run failed for some flags, e.g. --coverage - return _try_running(opt.program, table.join(flags, "-c", "-o", os.tmpfile(), sourcefile)) + return _try_running(opt.program, table.join("-Werror,-Wunused-command-line-argument", flags, "-c", "-o", os.tmpfile(), sourcefile)) end -- has_flags(flags)? -- cgit v1.3.1