diff options
| author | ruki <[email protected]> | 2023-01-12 08:36:43 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-01-12 08:36:43 +0800 |
| commit | 4a911fb47f4fd12cefbc4580d5ddceb9f65b9a81 (patch) | |
| tree | 738e993d5055ec7e701e31631dd5818510f8f95a /tests/projects/c++/modules/test_headerunits.lua | |
| parent | 15733580777f5a1c0a15da835a27d2c832539c93 (diff) | |
| parent | 9793894c1d2e055a4cfe044002bea4c7e6bb075d (diff) | |
Merge pull request #3255 from Arthapz/improve-clang-modules-support-with-libc++
improve clang libc++ module support
Diffstat (limited to 'tests/projects/c++/modules/test_headerunits.lua')
| -rw-r--r-- | tests/projects/c++/modules/test_headerunits.lua | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/projects/c++/modules/test_headerunits.lua b/tests/projects/c++/modules/test_headerunits.lua index 78c999497..6a942e583 100644 --- a/tests/projects/c++/modules/test_headerunits.lua +++ b/tests/projects/c++/modules/test_headerunits.lua @@ -25,10 +25,17 @@ function main(t) _build() end local clang = find_tool("clang", {version = true}) - if clang and clang.version and semver.compare(clang.version, "16.0") >= 0 then - os.exec("xmake clean -a") - os.exec("xmake f --toolchain=clang -c --yes") - _build() + if clang and clang.version then + if semver.compare(clang.version, "15.0") >= 0 then + os.exec("xmake clean -a") + os.exec("xmake f --toolchain=clang -c") + _build() + -- elseif semver.compare(clang.version, "15.0") >= 0 then + -- there is currently a bug on llvm git that prevent to build STL header units https://github.com/llvm/llvm-project/issues/58540 + -- os.exec("xmake clean -a") + -- os.exec("xmake f --toolchain=clang --cxxflags=\"-stdlib=libc++\" -c") + -- _build() + end end end end |
