diff options
| author | ruki <[email protected]> | 2022-08-04 22:57:53 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-08-04 22:57:53 +0800 |
| commit | 86dc716cbc9bf052012383f4448a069aa2a0bcb8 (patch) | |
| tree | 703d7bf5b6ba15016a22599148babce5f95d9935 /xmake/rules/c++/modules/modules_support/clang.lua | |
| parent | 339c50ca90f0f4fac4c8f3083386eb770f18f06a (diff) | |
improve has_flags
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/clang.lua')
| -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 0095444ed..b00d059b9 100644 --- a/xmake/rules/c++/modules/modules_support/clang.lua +++ b/xmake/rules/c++/modules/modules_support/clang.lua @@ -371,8 +371,8 @@ function has_headerunitsupport(target) local support_headerunits = _g.support_headerunits if support_headerunits == nil then local compinst = target:compiler("cxx") - if compinst:has_flags("-x c++-user-header", "cxxflags", {flagskey = "clang_user_header_unit_support"}) and - compinst:has_flags("-x c++-system-header", "cxxflags", {flagskey = "clang_system_header_unit_support"}) then + if compinst:has_flags("-x c++-user-header", "cxxflags", {flagskey = "clang_user_header_unit_support", tryrun = true}) and + compinst:has_flags("-x c++-system-header", "cxxflags", {flagskey = "clang_system_header_unit_support", tryrun = true}) then support_headerunits = true end _g.support_headerunits = support_headerunits or false |
