Skip to content

Commit dc016db

Browse files
author
Alexander Batashev
authored
[Buildbot][NFC] Add option to use LLD as linker (#3866)
Add convenience option to use lld as a linker instead of system default. This can significantly improve re-build performance, especially for debug builds. The linker must be installed and available in PATH.
1 parent f6569d1 commit dc016db

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

buildbot/configure.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def do_configure(args):
3030
llvm_enable_doxygen = 'OFF'
3131
llvm_enable_sphinx = 'OFF'
3232
llvm_build_shared_libs = 'OFF'
33+
llvm_enable_lld = 'OFF'
3334

3435
sycl_enable_xpti_tracing = 'ON'
3536

@@ -56,6 +57,9 @@ def do_configure(args):
5657
if args.shared_libs:
5758
llvm_build_shared_libs = 'ON'
5859

60+
if args.use_lld:
61+
llvm_enable_lld = 'ON'
62+
5963
install_dir = os.path.join(abs_obj_dir, "install")
6064

6165
cmake_cmd = [
@@ -81,7 +85,8 @@ def do_configure(args):
8185
"-DLLVM_ENABLE_DOXYGEN={}".format(llvm_enable_doxygen),
8286
"-DLLVM_ENABLE_SPHINX={}".format(llvm_enable_sphinx),
8387
"-DBUILD_SHARED_LIBS={}".format(llvm_build_shared_libs),
84-
"-DSYCL_ENABLE_XPTI_TRACING={}".format(sycl_enable_xpti_tracing)
88+
"-DSYCL_ENABLE_XPTI_TRACING={}".format(sycl_enable_xpti_tracing),
89+
"-DLLVM_ENABLE_LLD={}".format(llvm_enable_lld)
8590
]
8691

8792
if args.l0_headers and args.l0_loader:
@@ -151,6 +156,7 @@ def main():
151156
parser.add_argument("--use-libcxx", action="store_true", help="build sycl runtime with libcxx")
152157
parser.add_argument("--libcxx-include", metavar="LIBCXX_INCLUDE_PATH", help="libcxx include path")
153158
parser.add_argument("--libcxx-library", metavar="LIBCXX_LIBRARY_PATH", help="libcxx library path")
159+
parser.add_argument("--use-lld", action="store_true", help="Use LLD linker for build")
154160
args = parser.parse_args()
155161

156162
print("args:{}".format(args))

0 commit comments

Comments
 (0)