[zorg] r297352 - Jenkins build.py: add a --thinlto option.
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 8 17:25:31 PST 2017
Author: mehdi_amini
Date: Wed Mar 8 19:25:31 2017
New Revision: 297352
URL: http://llvm.org/viewvc/llvm-project?rev=297352&view=rev
Log:
Jenkins build.py: add a --thinlto option.
This option enables the general LTO option, but switch the
CMake cache in use.
Modified:
zorg/trunk/zorg/jenkins/build.py
Modified: zorg/trunk/zorg/jenkins/build.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/jenkins/build.py?rev=297352&r1=297351&r2=297352&view=diff
==============================================================================
--- zorg/trunk/zorg/jenkins/build.py (original)
+++ zorg/trunk/zorg/jenkins/build.py Wed Mar 8 19:25:31 2017
@@ -321,9 +321,16 @@ def clang_builder(target):
'./Build',
'./Root'])
install_prefix = conf.installdir()
+
+ # Infer which CMake cache file to use. If ThinLTO we select a specific one.
+ cmake_cachefile_thinlto = ''
+ if conf.thinlto:
+ cmake_cachefile_thinlto = '-ThinLTO'
+ cmake_cachefile = '{}/llvm/tools/clang/cmake/caches/Apple-stage2{}.cmake'.format(
+ conf.workspace, cmake_cachefile_thinlto)
+
cmake_command = env + ["/usr/local/bin/cmake", '-G', 'Ninja', '-C',
- '{}/llvm/tools/clang/cmake/caches/Apple-stage2.cmake'.format(
- conf.workspace),
+ cmake_cachefile,
'-DLLVM_ENABLE_ASSERTIONS:BOOL={}'.format(
"TRUE" if conf.assertions else "FALSE"),
'-DCMAKE_BUILD_TYPE=RelWithDebInfo',
@@ -957,6 +964,7 @@ def parse_args():
parser.add_argument('--assertions', dest='assertions', action='store_true')
parser.add_argument('--lto', dest='lto', action='store_true')
+ parser.add_argument('--thinlto', dest='thinlto', action='store_true')
parser.add_argument('--debug', dest='debug', action='store_true')
parser.add_argument('--cmake-type', dest='cmake_build_type',
help="Override cmake type Release, Debug, "
@@ -980,6 +988,8 @@ def parse_args():
" GlobalISel CMake flag.")
args = parser.parse_args()
+ if args.thinlto:
+ args.lto = True
return args
More information about the llvm-commits
mailing list