diff options
| author | ruki <[email protected]> | 2024-02-03 00:20:53 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-02-03 00:20:53 +0800 |
| commit | 48be7cd276d22c5cc16058fe328741c7ebd471d1 (patch) | |
| tree | b23950a0d822471ce13d03ab474569d67f91c369 /tests/projects/c++/modules/test_stdmodules.lua | |
| parent | bb4f92b8e9d7d78a6d815a97491a2be29acce033 (diff) | |
| parent | 6f7cc07f16041b0a5edfd23075a55ec7234fb89a (diff) | |
Merge pull request #4679 from Arthapz/support-clang-stdmodule
support libc++ std module
Diffstat (limited to 'tests/projects/c++/modules/test_stdmodules.lua')
| -rw-r--r-- | tests/projects/c++/modules/test_stdmodules.lua | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/tests/projects/c++/modules/test_stdmodules.lua b/tests/projects/c++/modules/test_stdmodules.lua index 222ec9458..c408c1d08 100644 --- a/tests/projects/c++/modules/test_stdmodules.lua +++ b/tests/projects/c++/modules/test_stdmodules.lua @@ -13,15 +13,15 @@ end function main(t) if is_subhost("windows") then - -- local clang = find_tool("clang", {version = true}) - -- if clang and clang.version and semver.compare(clang.version, "18.0") >= 0 then + local clang = find_tool("clang", {version = true}) + if clang and clang.version and semver.compare(clang.version, "18.0") >= 0 then + -- clang don't support msstl std modules atm -- os.exec("xmake f --toolchain=clang -c --yes") -- _build() - -- clang don't support libc++ std modules atm - -- os.exec("xmake clean -a") - -- os.exec("xmake f --toolchain=clang --runtimes=c++_shared -c --yes") - -- _build() - -- end + os.exec("xmake clean -a") + os.exec("xmake f --toolchain=clang --runtimes=c++_shared -c --yes") + _build() + end local msvc = toolchain.load("msvc") if msvc and msvc:check() then local vcvars = msvc:config("vcvars") @@ -44,16 +44,15 @@ function main(t) -- os.exec("xmake f -c --yes") -- _build() -- end - -- local clang = find_tool("clang", {version = true}) - -- if clang and clang.version and semver.compare(clang.version, "18.0") >= 0 then + local clang = find_tool("clang", {version = true}) + if clang and clang.version and semver.compare(clang.version, "18.0") >= 0 then -- clang don't support libstdc++ std modules atm -- os.exec("xmake clean -a") -- os.exec("xmake f --toolchain=clang -c --yes") -- _build() - -- clang don't support libc++ std modules atm - -- os.exec("xmake clean -a") - -- os.exec("xmake f --toolchain=clang --runtimes=c++_shared -c --yes") - -- _build() - -- end + os.exec("xmake clean -a") + os.exec("xmake f --toolchain=clang --runtimes=c++_shared -c --yes") + _build() + end end end |
