mirror of
https://github.com/ROCm/ROCm.git
synced 2026-04-05 03:01:17 -04:00
[BUILD] Fix the build bug when user use system package of llvm by setting LLVM_SYSPATH (#1336)
When the user set the `LLVM_SYSPATH` to use custom build llvm, it will throw the error because there is no version.txt under the custom build one. This PR skips the version check If the `LLVM_SYSPATH` is set. --------- Co-authored-by: Philippe Tillet <phil@openai.com>
This commit is contained in:
@@ -83,8 +83,8 @@ def get_thirdparty_packages(triton_cache_path):
|
||||
if p.syspath_var_name in os.environ:
|
||||
package_dir = os.environ[p.syspath_var_name]
|
||||
version_file_path = os.path.join(package_dir, "version.txt")
|
||||
if not os.path.exists(version_file_path) or\
|
||||
Path(version_file_path).read_text() != p.url:
|
||||
if p.syspath_var_name not in os.environ and\
|
||||
(not os.path.exists(version_file_path) or Path(version_file_path).read_text() != p.url):
|
||||
try:
|
||||
shutil.rmtree(package_root_dir)
|
||||
except Exception:
|
||||
|
||||
Reference in New Issue
Block a user