Skip to content

Commit 1c89003

Browse files
authored
Merge pull request #291 from nathanchance/runtimes-llvm-20
tc_build: llvm: Use runtimes build for LLVM 20 and newer
2 parents ddd3804 + 4dcf795 commit 1c89003

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tc_build/llvm.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
from tc_build.builder import Builder
1313
import tc_build.utils
1414

15+
LLVM_VER_FOR_RUNTIMES = 20
16+
1517

1618
def get_all_targets(llvm_folder):
1719
contents = Path(llvm_folder, 'llvm/CMakeLists.txt').read_text(encoding='utf-8')
@@ -251,7 +253,8 @@ def configure(self):
251253

252254
# https://github.com/llvm/llvm-project/commit/b593110d89aea76b8b10152b24ece154bff3e4b5
253255
llvm_enable_projects = self.projects.copy()
254-
if self.llvm_major_version >= 21 and self.project_is_enabled('compiler-rt'):
256+
if self.llvm_major_version >= LLVM_VER_FOR_RUNTIMES and self.project_is_enabled(
257+
'compiler-rt'):
255258
llvm_enable_projects.remove('compiler-rt')
256259
self.cmake_defines['LLVM_ENABLE_RUNTIMES'] = 'compiler-rt'
257260
self.cmake_defines['LLVM_ENABLE_PROJECTS'] = ';'.join(llvm_enable_projects)
@@ -433,7 +436,7 @@ def configure(self):
433436
distribution_components.append('lld')
434437
if build_compiler_rt:
435438
distribution_components.append('llvm-profdata')
436-
if self.llvm_major_version >= 21:
439+
if self.llvm_major_version >= LLVM_VER_FOR_RUNTIMES:
437440
distribution_components.append('runtimes')
438441
runtime_distribution_components.append('profile')
439442
else:

0 commit comments

Comments
 (0)