Skip to content

Commit 76a5096

Browse files
committed
Fix flang-aarch64-libcxx builder
After flang-rt, flang-aarch64-libcxx builder started to fail. Before it, llvm libraries, flang and its runtime were built with the host compiler, but now flang runtime is built with the stage 1 clang. The problem is that the C++ library of these compilers may be incompatible. The linked issue has more details. To avoid this issue, build flang-rt with the host compiler. Fixes llvm/llvm-project#135381
1 parent bbd9fbe commit 76a5096

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

buildbot/osuosl/master/config/builders.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2489,6 +2489,9 @@
24892489
"-DLLVM_ENABLE_ASSERTIONS=ON",
24902490
"-DLLVM_ENABLE_LIBCXX=On",
24912491
"-DCMAKE_BUILD_TYPE=Release",
2492+
"-DLLVM_RUNTIME_TARGETS=aarch64-unknown-linux-gnu",
2493+
"-DRUNTIMES_aarch64-unknown-linux-gnu_CMAKE_CXX_COMPILER='c++'",
2494+
"-DRUNTIMES_aarch64-unknown-linux-gnu_CMAKE_C_COMPILER='cc'"
24922495
])},
24932496

24942497
{'name' : "flang-aarch64-release",

zorg/buildbot/builders/FlangBuilder.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,22 @@ def getFlangOutOfTreeBuildFactory(
138138
)
139139
)
140140

141+
# 'check-flang-rt' becomes 'check-flang-rt-<target>' when a runtime target
142+
# is specified.
143+
check_flang_rt = 'check-flang-rt'
144+
for arg in llvm_extra_configure_args:
145+
if arg.find("DLLVM_RUNTIME_TARGETS") != -1:
146+
targets = arg.split('=', 1)[1]
147+
# Currently only one target is supported.
148+
if not targets or targets.find(";") != -1:
149+
break
150+
check_flang_rt += '-' + targets
151+
break
152+
141153
addNinjaSteps(
142154
f,
143155
obj_dir=flang_rt_obj_dir,
144-
checks=['check-flang-rt'],
156+
checks=[check_flang_rt],
145157
env=env,
146158
stage_name="flang-rt",
147159
**kwargs)

0 commit comments

Comments
 (0)