diff options
Diffstat (limited to 'xmake/modules/detect/tools')
| -rw-r--r-- | xmake/modules/detect/tools/gcc/has_flags.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xmake/modules/detect/tools/gcc/has_flags.lua b/xmake/modules/detect/tools/gcc/has_flags.lua index e229e023a..a0cceda72 100644 --- a/xmake/modules/detect/tools/gcc/has_flags.lua +++ b/xmake/modules/detect/tools/gcc/has_flags.lua @@ -94,7 +94,8 @@ function _check_try_running(flags, opt, islinker) if islinker then -- get extension - local extension = table.wrap(language.sourcekinds()[opt.toolkind or "cc"])[1] or ".c" + -- @note we need detect extension for ndk/clang++.exe: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated] + local extension = opt.program:endswith("++") and ".cpp" or (table.wrap(language.sourcekinds()[opt.toolkind or "cc"])[1] or ".c") -- make an stub source file local sourcefile = path.join(os.tmpdir(), "detect", "gcc_has_flags" .. extension) |
