[PATCH] D91474: [buildbot] Fix worker for ThinLTO whole program devirtualization
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 13 20:04:48 PST 2020
tejohnson created this revision.
tejohnson added a reviewer: gkistanova.
Herald added subscribers: steven_wu, hiraditya, inglorion, Prazek.
tejohnson requested review of this revision.
This fixes a syntax error in the extra_configure_args provided to
getClangWithLTOBuildFactory, we shouldn't be surrounding the options
with double quotes.
Once that is fixed, I realized from testing the failing command locally
that it will still fail, because the clang-specific extra_configure_args
are also used by the initial stage1 build with the system compiler,
which is gcc. We only want these for the last stage, where LTO is
performed. Added a new parameter to getClangWithLTOBuildFactory,
extra_configure_args_lto_stage, to pass the options only to that LTO
stage.
Is there a way to test my change to ClangLTOBuilder.py?
Repository:
rZORG LLVM Github Zorg
https://reviews.llvm.org/D91474
Files:
buildbot/osuosl/master/config/builders.py
zorg/buildbot/builders/ClangLTOBuilder.py
Index: zorg/buildbot/builders/ClangLTOBuilder.py
===================================================================
--- zorg/buildbot/builders/ClangLTOBuilder.py
+++ zorg/buildbot/builders/ClangLTOBuilder.py
@@ -233,6 +233,7 @@
clean = False,
jobs = None,
extra_configure_args = None,
+ extra_configure_args_lto_stage = None,
compare_last_2_stages = True,
lto = None, # The string gets passed to -flto flag as is. Like -flto=thin.
env = None,
@@ -253,10 +254,15 @@
else:
extra_configure_args = list(extra_configure_args)
+ if extra_configure_args_lto_stage is None:
+ extra_configure_args_lto_stage = []
+ else:
+ extra_configure_args_lto_stage = list(extra_configure_args_lto_stage)
+
# Make sure CMAKE_INSTALL_PREFIX and -G are not specified
# in the extra_configure_args. We set them internally as needed.
# TODO: assert extra_configure_args.
- install_prefix_specified = any(a.startswith('-DCMAKE_INSTALL_PREFIX=') for a in extra_configure_args)
+ install_prefix_specified = any(a.startswith('-DCMAKE_INSTALL_PREFIX=') for a in extra_configure_args) or any(a.startswith('-DCMAKE_INSTALL_PREFIX=') for a in extra_configure_args_lto_stage)
assert not install_prefix_specified, "Please do not explicitly specify the install prefix for multi-stage build."
# Prepare environmental variables. Set here all env we want everywhere.
@@ -321,7 +327,7 @@
s = f.staged_compiler_idx + 1
staged_install = f.stage_installdirs[f.staged_compiler_idx]
for i in range(s, len(f.stage_objdirs[s:]) + s):
- configure_args = extra_configure_args[:]
+ configure_args = extra_configure_args[:] + extra_configure_args_lto_stage[:]
configure_args.append(
WithProperties(
Index: buildbot/osuosl/master/config/builders.py
===================================================================
--- buildbot/osuosl/master/config/builders.py
+++ buildbot/osuosl/master/config/builders.py
@@ -1067,11 +1067,11 @@
'factory' : ClangLTOBuilder.getClangWithLTOBuildFactory(
jobs=72,
lto='thin',
- extra_configure_args=[
+ extra_configure_args_lto_stage=[
'-DLLVM_CCACHE_BUILD=ON',
- '-DCMAKE_CXX_FLAGS="-O3 -Xclang -fwhole-program-vtables -fno-split-lto-unit"',
- '-DCMAKE_C_FLAGS="-O3 -Xclang -fwhole-program-vtables -fno-split-lto-unit"',
- '-DCMAKE_EXE_LINKER_FLAGS="-Wl,--lto-whole-program-visibility"'])},
+ '-DCMAKE_CXX_FLAGS=-O3 -Xclang -fwhole-program-vtables -fno-split-lto-unit',
+ '-DCMAKE_C_FLAGS=-O3 -Xclang -fwhole-program-vtables -fno-split-lto-unit',
+ '-DCMAKE_EXE_LINKER_FLAGS=-Wl,--lto-whole-program-visibility'])},
{'name' : "clang-with-lto-ubuntu",
'tags' : ["clang","lld","LTO"],
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91474.305296.patch
Type: text/x-patch
Size: 3031 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201114/cb5a549d/attachment.bin>
More information about the llvm-commits
mailing list