Skip to content

Commit

Permalink
[misc] Downgrade clang version to 14.0.6 on CI (#8417)
Browse files Browse the repository at this point in the history
Issue: #

### Brief Summary

<!--
copilot:summary
-->
### <samp>🤖[[deprecated]](https://githubnext.com/copilot-for-prs-sunset)
Generated by Copilot at ea4dd51</samp>

Update clang dependency for Windows LLVM backend. This file changes the
download URL for `clang` on Windows to use version 14.0.6, which has bug
fixes and better compatibility for the LLVM backend of the `taichi`
compiler.

### Walkthrough

<!--
copilot:walkthrough
-->
### <samp>🤖[[deprecated]](https://githubnext.com/copilot-for-prs-sunset)
Generated by Copilot at ea4dd51</samp>

* Upgrade the LLVM backend of the taichi compiler by using a newer
version of clang on Windows
([link](https://github.com/taichi-dev/taichi/pull/8417/files?diff=unified&w=0#diff-67455722e4753f6e374de9e8113c60adb89c5e011615abe630a5806c87638ca0L40-R40))
  • Loading branch information
jim19930609 authored Nov 22, 2023
1 parent bfa7d10 commit 04955b3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/scripts/ti_build/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def setup_clang(as_compiler=True) -> None:
"""
u = platform.uname()
if u.system in ("Linux", "Darwin"):
for v in ("", "-15", "-14", "-13", "-12", "-11", "-10"):
for v in ("", "-14", "-13", "-12", "-11", "-10"):
clang = shutil.which(f"clang{v}")
if clang is not None:
clangpp = shutil.which(f"clang++{v}")
Expand All @@ -36,8 +36,8 @@ def setup_clang(as_compiler=True) -> None:
return

elif (u.system, u.machine) == ("Windows", "AMD64"):
out = get_cache_home() / "clang-15-v2"
url = "https://github.com/taichi-dev/taichi_assets/releases/download/llvm15/clang-15.0.0-win-complete.zip"
out = get_cache_home() / "clang-14-v2"
url = "https://github.com/taichi-dev/taichi_assets/releases/download/llvm15/clang-14.0.6-win-complete.zip"
download_dep(url, out, force=True)
clang = str(out / "bin" / "clang++.exe").replace("\\", "\\\\")
clangpp = clang
Expand Down
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,6 @@ if (TI_WITH_LLVM)

check_clang_version()

if (${CLANG_VERSION_MAJOR} VERSION_GREATER ${CLANG_HIGHEST_VERSION})
message(FATAL_ERROR "${CLANG_EXECUTABLE} version: ${CLANG_VERSION}, required: <=${CLANG_HIGHEST_VERSION}. Consider passing -DCLANG_EXECUTABLE=/path/to/clang to cmake to use a specific clang.")
endif()

add_subdirectory(taichi/runtime/llvm/runtime_module)
endif()

Expand Down

0 comments on commit 04955b3

Please sign in to comment.