diff options
| author | Arthur LAURENT <[email protected]> | 2023-02-15 18:15:42 +0100 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2023-02-15 18:15:42 +0100 |
| commit | f6b9179af9ff16461e023f00ef10535b6e575ced (patch) | |
| tree | c383e40cfd8d74dcb54a812b72f0fcd4782d3268 /xmake/rules/c++/modules/modules_support | |
| parent | 4220ee54e0f12461ef2186f8ccf4a7823ece2ee7 (diff) | |
fix headerunit clang support detection
Diffstat (limited to 'xmake/rules/c++/modules/modules_support')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/clang.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua index e8d52dcba..d505d779c 100644 --- a/xmake/rules/c++/modules/modules_support/clang.lua +++ b/xmake/rules/c++/modules/modules_support/clang.lua @@ -823,8 +823,8 @@ function has_headerunitsupport(target) local compinst = target:compiler("cxx") local _, modulestsflag, withoutflag = get_modulesflag(target) modulestsflag = withoutflag and "" or modulestsflag - if compinst:has_flags(modulestsflag .. " -std=c++20 -x c++-user-header", "cxxflags", {flagskey = "clang_user_header_unit_support", tryrun = true}) and - compinst:has_flags(modulestsflag .. " -std=c++20 -x c++-system-header", "cxxflags", {flagskey = "clang_system_header_unit_support", tryrun = true}) then + if compinst:has_flags(modulestsflag .. " -std=c++20 -x c++-user-header", "cxxflags", {snippet = "inline int foo() { return 0; }", flagskey = "clang_user_header_unit_support", tryrun = true}) and + compinst:has_flags(modulestsflag .. " -std=c++20 -x c++-system-header", "cxxflags", {snippet = "inline int foo() { return 0; }", flagskey = "clang_system_header_unit_support", tryrun = true}) then support_headerunits = true end _g.support_headerunits = support_headerunits or false |
