Skip to content

Commit 699b96d

Browse files
authored
Add a new LLDB remote-linux builder on Windows host (lldb-remote-linux-win). (#297)
Also add a new worker for the builder - as-builder-10.
1 parent 8b086e3 commit 699b96d

File tree

3 files changed

+142
-1
lines changed

3 files changed

+142
-1
lines changed

buildbot/osuosl/master/config/builders.py

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3424,4 +3424,136 @@
34243424
},
34253425
)
34263426
},
3427+
3428+
# LLDB remote-linux on Windows host.
3429+
# The first stage builds the latest cross Aarch64 toolchain.
3430+
# The second stage uses just-built cross Aarch64 Clang toolchain
3431+
# (see llvm-clang-win-x-aarch64 builder configuration for the details).
3432+
# The remote host is ARM Cortex A76/A78 board with Ubuntu Linux.
3433+
{'name': "lldb-remote-linux-win",
3434+
'tags' : ["llvm", "clang", "lldb", "cross", "aarch64"],
3435+
'workernames': ["as-builder-10"],
3436+
'builddir': "lldb-x-aarch64",
3437+
'factory': UnifiedTreeBuilder.getCmakeExBuildFactory(
3438+
depends_on_projects = ["llvm", "clang", "lld", "lldb"],
3439+
enable_runtimes = None,
3440+
checks = [
3441+
"check-lldb-unit",
3442+
"check-lldb-api",
3443+
"check-lldb-shell",
3444+
],
3445+
vs = "autodetect",
3446+
clean = True,
3447+
cmake_definitions = {
3448+
"CMAKE_BUILD_TYPE" : "Release",
3449+
"CMAKE_C_COMPILER_LAUNCHER" : "ccache",
3450+
"CMAKE_CXX_COMPILER_LAUNCHER" : "ccache",
3451+
"CMAKE_CXX_FLAGS" : "-D__OPTIMIZE__",
3452+
"LLVM_TARGETS_TO_BUILD" : "AArch64",
3453+
#Note: needs for some LLDB tests.
3454+
"LLVM_TARGET_TRIPLE" : "aarch64-unknown-linux-gnu",
3455+
"LLVM_INCLUDE_BENCHMARKS" : "OFF",
3456+
"LLVM_PARALLEL_LINK_JOBS" : 8,
3457+
"LLVM_LIT_ARGS" : "-v -vv --threads=8",
3458+
3459+
"TOOLCHAIN_TARGET_TRIPLE" : "aarch64-unknown-linux-gnu",
3460+
"TOOLCHAIN_TARGET_COMPILER_FLAGS" : "-mcpu=cortex-a78",
3461+
"TOOLCHAIN_TARGET_SYSROOTFS" : util.Interpolate("%(prop:sysroot_path_aarch64)s"),
3462+
"LIBCXX_ABI_VERSION" : "1",
3463+
"LLVM_INSTALL_TOOLCHAIN_ONLY" : "OFF",
3464+
3465+
"LLDB_TEST_ARCH" : "aarch64",
3466+
"LLDB_TEST_COMPILER" : util.Interpolate("%(prop:builddir)s/build/bin/clang.exe"),
3467+
"LLDB_TEST_PLATFORM_URL" : util.Interpolate("connect://%(prop:remote_test_host)s:1234"),
3468+
"LLDB_TEST_PLATFORM_WORKING_DIR": "/home/ubuntu/lldb-tests",
3469+
"LLDB_TEST_SYSROOT" : util.Interpolate("%(prop:sysroot_path_aarch64)s"),
3470+
"LLDB_ENABLE_PYTHON" : "ON",
3471+
"LLDB_ENABLE_SWIG" : "ON",
3472+
"LLDB_ENABLE_LIBEDIT" : "OFF",
3473+
"LLDB_ENABLE_CURSES" : "OFF",
3474+
"LLDB_ENABLE_LZMA" : "OFF",
3475+
"LLDB_ENABLE_LIBXML2" : "OFF",
3476+
# No need to build lldb-server during the first stage.
3477+
# We are going to build it for the target platform later.
3478+
"LLDB_CAN_USE_LLDB_SERVER" : "OFF",
3479+
"LLDB_TEST_USER_ARGS" : util.Interpolate(
3480+
"--env;ARCH_CFLAGS=-mcpu=cortex-a78;" \
3481+
"--platform-name;remote-linux"),
3482+
},
3483+
cmake_options = [
3484+
"-C", util.Interpolate("%(prop:srcdir_relative)s/clang/cmake/caches/CrossWinToARMLinux.cmake"),
3485+
],
3486+
install_dir = "native",
3487+
post_build_steps =
3488+
# Stage 2.
3489+
# Build the target's lldb-server (cross compilation with pre-installed/pre-built aarch64 clang).
3490+
UnifiedTreeBuilder.getCmakeExBuildFactory(
3491+
depends_on_projects = ["clang", "lldb"],
3492+
enable_runtimes = None,
3493+
checks = None,
3494+
clean = True,
3495+
repo_profiles = None,
3496+
allow_cmake_defaults = False,
3497+
hint = "aarch64-lldb",
3498+
cmake_definitions = {
3499+
"CMAKE_BUILD_TYPE" : "Release",
3500+
"CMAKE_C_COMPILER_LAUNCHER" : "ccache",
3501+
"CMAKE_CXX_COMPILER_LAUNCHER" : "ccache",
3502+
"CMAKE_CXX_FLAGS" : "-mcpu=cortex-a78 -D__OPTIMIZE__ -fPIC --stdlib=libc++",
3503+
"CMAKE_C_FLAGS" : "-mcpu=cortex-a78 -D__OPTIMIZE__ -fPIC",
3504+
"CMAKE_EXE_LINKER_FLAGS" : "-Wl,-l:libc++abi.a -Wl,-l:libc++.a -Wl,-l:libunwind.a",
3505+
"CMAKE_SHARED_LINKER_FLAGS" : "-Wl,-l:libc++abi.a -Wl,-l:libc++.a -Wl,-l:libunwind.a",
3506+
"CMAKE_CXX_COMPILER" : util.Interpolate("%(prop:builddir)s/build/bin/clang++.exe"),
3507+
"CMAKE_C_COMPILER" : util.Interpolate("%(prop:builddir)s/build/bin/clang.exe"),
3508+
"CMAKE_ASM_COMPILER" : util.Interpolate("%(prop:builddir)s/build/bin/clang.exe"),
3509+
"CMAKE_SYSTEM_NAME" : "Linux",
3510+
"CMAKE_SYSTEM_PROCESSOR" : "aarch64",
3511+
"CMAKE_CROSSCOMPILING" : "ON",
3512+
3513+
# Required for the native table-gen
3514+
"LLVM_NATIVE_TOOL_DIR" : util.Interpolate("%(prop:builddir)s/build/bin"),
3515+
3516+
"LLVM_DEFAULT_TARGET_TRIPLE" : "aarch64-unknown-linux-gnu",
3517+
"LLVM_HOST_TRIPLE" : "aarch64-unknown-linux-gnu",
3518+
"LLVM_TARGETS_TO_BUILD" : "AArch64",
3519+
"LLVM_ENABLE_ASSERTIONS" : "ON",
3520+
"LLVM_INCLUDE_BENCHMARKS" : "OFF",
3521+
"LLVM_PARALLEL_LINK_JOBS" : 8,
3522+
"CLANG_DEFAULT_LINKER" : "lld",
3523+
3524+
"LLDB_INCLUDE_TESTS" : "OFF",
3525+
"LLDB_ENABLE_PYTHON" : "OFF",
3526+
"LLDB_ENABLE_LIBEDIT" : "OFF",
3527+
"LLDB_ENABLE_CURSES" : "OFF",
3528+
"LLDB_ENABLE_LZMA" : "OFF",
3529+
3530+
"LLVM_ENABLE_ZLIB" : "OFF",
3531+
},
3532+
obj_dir = "build-lldb-server",
3533+
targets = ["lldb-server"],
3534+
install_dir = util.Interpolate("%(prop:builddir)s/lldb-server-install"),
3535+
install_targets = ["install-lldb-server"],
3536+
post_finalize_steps = [
3537+
steps.ShellSequence(name = "exec-lldb-server",
3538+
commands = [
3539+
util.ShellArg(command=[ "ssh", util.Interpolate("%(prop:remote_test_user)s@%(prop:remote_test_host)s"), "killall lldb-server ; exit 0;" ], logname="stdio"),
3540+
util.ShellArg(command=[ "scp", "lldb-server", util.Interpolate("%(prop:remote_test_user)s@%(prop:remote_test_host)s:~/lldb-server") ], logname="stdio"),
3541+
util.ShellArg(command=[ "ssh", util.Interpolate("%(prop:remote_test_user)s@%(prop:remote_test_host)s"), "chmod +x ~/lldb-server" ], logname="stdio"),
3542+
util.ShellArg(command=[ "ssh", util.Interpolate("%(prop:remote_test_user)s@%(prop:remote_test_host)s"),
3543+
"$(nohup ~/lldb-server p --listen '*:1234' --server > /dev/null 2>&1 &)" ], logname="stdio"),
3544+
],
3545+
workdir = util.Interpolate("%(prop:builddir)s/lldb-server-install/bin"),
3546+
description = "execute lldb-server on remote target",
3547+
haltOnFailure = True,
3548+
),
3549+
],
3550+
),
3551+
env = {
3552+
'CCACHE_DIR' : util.Interpolate("%(prop:builddir)s/ccache-db"),
3553+
# TMP/TEMP within the build dir (to utilize a ramdisk).
3554+
'TMP' : util.Interpolate("%(prop:builddir)s/build"),
3555+
'TEMP' : util.Interpolate("%(prop:builddir)s/build"),
3556+
},
3557+
)
3558+
},
34273559
]

buildbot/osuosl/master/config/status.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def getReporters():
257257
"llvm-clang-win-x-armv7l", "llvm-clang-win-x-aarch64",
258258
"llvm-nvptx-nvidia-ubuntu", "llvm-nvptx64-nvidia-ubuntu",
259259
"llvm-nvptx-nvidia-win", "llvm-nvptx64-nvidia-win",
260-
"lldb-remote-linux-ubuntu"])
260+
"lldb-remote-linux-ubuntu", "lldb-remote-linux-win"])
261261
]),
262262
reporters.MailNotifier(
263263
fromaddr = status_email_fromaddr,

buildbot/osuosl/master/config/workers.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,15 @@ def get_all():
247247
'tools_root_path' : '/home/buildbot/worker/as-builder-9/tools',
248248
},
249249
max_builds=1),
250+
# Windows Server 2022
251+
create_worker("as-builder-10", properties={
252+
'jobs' : 128,
253+
'remote_test_host' : 'jetson-agx-0086.lab.llvm.org',
254+
'remote_test_user' : 'ubuntu',
255+
'sysroot_path_aarch64' : 'c:/buildbot/fs/jetson-agx-ubuntu',
256+
'zlib_root_path' : 'c:/buildbot/fs/zlib-win32',
257+
},
258+
max_builds=1),
250259

251260
# Solaris 11
252261
create_worker("solaris11-amd64", properties={'jobs' : 8}, max_builds=1),

0 commit comments

Comments
 (0)