Skip to content

Commit 6d03143

Browse files
committed
[lldb][zorg] Fetch LLDB artifact instead of building it
Since #283, the intel LLDB incremental bot publishes its artifacts, so lets use those instead of building our own Clang. Drive-by change: * Pass the non-bootstrap directory to the metrics script (since we no longer bootstrap)
1 parent 7209e50 commit 6d03143

File tree

1 file changed

+13
-60
lines changed

1 file changed

+13
-60
lines changed

zorg/jenkins/jobs/jobs/lldb-statistics

Lines changed: 13 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,7 @@ pipeline {
3434
parameters {
3535
string(name: 'LABEL', defaultValue: params.LABEL ?: 'macos-x86_64', description: 'Node label to run on')
3636
string(name: 'GIT_SHA', defaultValue: params.GIT_REVISION ?: '*/release/19.x', description: 'Git commit to build.')
37-
38-
// TODO: we should get LLDB as an artifact from the lldb-cmake-intel/latest job. Said job doesn't currently
39-
// publish LLDB/Clang as an artifact however. So instead we build Clang/LLDB from top-of-tree main.
40-
// string(name: 'ARTIFACT', defaultValue: params.ARTIFACT ?: 'lldb-cmake-intel/latest', description: 'Clang/LLDB artifact to use')
41-
37+
string(name: 'ARTIFACT', defaultValue: params.ARTIFACT ?: 'llvm.org/lldb-cmake/latest', description: 'Clang/LLDB artifact to use')
4238
booleanParam(name: 'CLEAN', defaultValue: params.CLEAN ?: false, description: 'Wipe the build directory?')
4339
}
4440

@@ -67,16 +63,6 @@ pipeline {
6763
noTags: true, timeout: 30]
6864
]])
6965
}
70-
dir('src/host-main') {
71-
checkout([$class: 'GitSCM', branches: [
72-
[name: '*/main']
73-
], userRemoteConfigs: [
74-
[url: 'https://github.com/llvm/llvm-project.git']
75-
], extensions: [
76-
[$class: 'CloneOption',
77-
noTags: true, timeout: 30]
78-
]])
79-
}
8066
dir('llvm-zorg') {
8167
checkout([$class: 'GitSCM', branches: [
8268
[name: '*/main']
@@ -102,52 +88,19 @@ pipeline {
10288
'''
10389
}
10490
}
105-
stage('Build (host)') {
91+
stage('Fetch Artifact') {
10692
environment {
10793
PATH="$PATH:/usr/bin:/usr/local/bin"
108-
SRC="$WORKSPACE/src"
109-
HOST_SRC="$WORKSPACE/src/host-main"
110-
HOST_BUILD="$WORKSPACE/host-main-build"
11194
}
11295
steps {
11396
withCredentials([string(credentialsId: 's3_resource_bucket', variable: 'S3_BUCKET')]) {
114-
sh '''
115-
source ./venv/bin/activate
116-
117-
cd $HOST_SRC
118-
git tag -a -m "First Commit" first_commit 97724f18c79c7cc81ced24239eb5e883bf1398ef || true
119-
120-
git_desc=$(git describe --match "first_commit")
121-
export GIT_DISTANCE=$(echo ${git_desc} | cut -f 2 -d "-")
122-
123-
sha=$(echo ${git_desc} | cut -f 3 -d "-")
124-
export GIT_SHA=${sha:1}
125-
126-
cd -
127-
128-
set -eux
129-
130-
$CXX --version
131-
LLVM_REV=${GIT_DISTANCE}
132-
133-
mkdir -p host-main-src
134-
mkdir -p host-main-build
135-
rsync -a $HOST_SRC/ host-main-src/
136-
cd host-main-build
137-
cmake ../host-main-src/llvm \
138-
-DCMAKE_BUILD_TYPE=Release \
139-
-DLLVM_ENABLE_PROJECTS="clang;lldb" \
140-
-DLLVM_ENABLE_ASSERTIONS=Off \
141-
-DLLVM_ENABLE_MODULES=Off \
142-
-DLLDB_INCLUDE_TESTS=Off \
143-
-DLLDB_ENABLE_PYTHON=On \
144-
-DLLDB_ENABLE_LUA=Off \
145-
-DLLVM_TARGETS_TO_BUILD='X86;AArch64' \
146-
-DCMAKE_EXPORT_COMPILE_COMMANDS=On \
147-
-G Ninja
148-
cmake --build .
149-
cd ../..
150-
'''
97+
sh """
98+
source ./venv/bin/activate
99+
echo "ARTIFACT=${params.ARTIFACT}"
100+
python llvm-zorg/zorg/jenkins/monorepo_build.py fetch
101+
ls $WORKSPACE/host-compiler/lib/clang/
102+
VERSION=`ls $WORKSPACE/host-compiler/lib/clang/`
103+
"""
151104
}
152105
}
153106
}
@@ -158,8 +111,8 @@ pipeline {
158111
BUILD="$WORKSPACE/clang-19-build"
159112
HOST_BUILD="$WORKSPACE/clang-19-build"
160113
HISTORIC_COMPILER="clang-19"
161-
CC="$WORKSPACE/host-main-build/bin/clang"
162-
CXX="$WORKSPACE/host-main-build/bin/clang++"
114+
CC="$WORKSPACE/host-compiler/bin/clang"
115+
CXX="$WORKSPACE/host-compiler/bin/clang++"
163116
}
164117
steps {
165118
withCredentials([string(credentialsId: 's3_resource_bucket', variable: 'S3_BUCKET')]) {
@@ -207,8 +160,8 @@ pipeline {
207160
}
208161
stage('Run metrics') {
209162
environment {
210-
HOST_BUILD_DIR="$WORKSPACE/host-build"
211-
HISTORIC_BUILD_DIR="$WORKSPACE/clang-19-build/tools/clang/stage2-bins"
163+
HOST_BUILD_DIR="$WORKSPACE/host-compiler"
164+
HISTORIC_BUILD_DIR="$WORKSPACE/clang-19-build"
212165
}
213166
steps {
214167
sh '''

0 commit comments

Comments
 (0)