diff options
| author | ruki <[email protected]> | 2025-11-22 00:40:44 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-11-22 00:40:44 +0800 |
| commit | b68aca8d7221f6554e04884c289d50eba6f54ad0 (patch) | |
| tree | e9453e9ab9197d9cfdbb0a372ab809e2ee4ae1cc | |
| parent | 76a0bd604dd7dd39e6f9e49969bb1a14bc1ac3b2 (diff) | |
suppress clang-cl warnings #7049
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index fa88ab5a4..7d14d56fb 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -663,6 +663,14 @@ function compargv(self, sourcefile, objectfile, flags, opt) -- make the compile arguments list local argv = table.join("-c", flags, "-Fo" .. objectfile, sourcefile) + + -- suppress clang-cl warnings + -- clang-cl: warning: argument unused during compilation: '-c' [-Wunused-command-line-argument] + -- + -- @see https://github.com/xmake-io/xmake/issues/7049 + if self:name() == "clang_cl" and objectfile:endswith(".pcm") then + table.remove(argv, 1) + end return self:program(), (opt and opt.rawargs) and argv or winos.cmdargv(argv) end |
