Skip to content

Commit a2be91d

Browse files
Roll Clang to clang 14 (945cde8b6a4579406886d08f803b632e00f0b1ec) (#6362)
* Fix clang roll * Disable dataflow where it breaks
1 parent 7e5ede0 commit a2be91d

File tree

4 files changed

+20
-12
lines changed

4 files changed

+20
-12
lines changed

infra/base-images/base-clang/checkout_build_install_llvm.sh

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ NPROC=$(expr $(nproc) / 2)
2222

2323
# zlib1g-dev is needed for llvm-profdata to handle coverage data from rust compiler
2424
LLVM_DEP_PACKAGES="build-essential make cmake ninja-build git python3 python3-distutils g++-multilib binutils-dev zlib1g-dev"
25-
apt-get install -y $LLVM_DEP_PACKAGES --no-install-recommends
25+
apt-get update && apt-get install -y $LLVM_DEP_PACKAGES --no-install-recommends
2626

2727
# Checkout
2828
CHECKOUT_RETRIES=10
@@ -74,7 +74,7 @@ OUR_LLVM_REVISION=llvmorg-12-init-17251-g6de48655
7474

7575
# To allow for manual downgrades. Set to 0 to use Chrome's clang version (i.e.
7676
# *not* force a manual downgrade). Set to 1 to force a manual downgrade.
77-
FORCE_OUR_REVISION=1
77+
FORCE_OUR_REVISION=0
7878
LLVM_REVISION=$(grep -Po "CLANG_REVISION = '\K([^']+)" scripts/update.py)
7979

8080
clone_with_retries https://github.com/llvm/llvm-project.git $LLVM_SRC
@@ -124,10 +124,24 @@ rm -rf $WORK/llvm-stage1 $WORK/llvm-stage2
124124
# Use the clang we just built from now on.
125125
CMAKE_EXTRA_ARGS="-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++"
126126

127+
function cmake_libcxx {
128+
extra_args="$@"
129+
cmake -G "Ninja" \
130+
-DLIBCXX_ENABLE_SHARED=OFF \
131+
-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON \
132+
-DLIBCXXABI_ENABLE_SHARED=OFF \
133+
-DCMAKE_BUILD_TYPE=Release \
134+
-DLLVM_TARGETS_TO_BUILD="$TARGET_TO_BUILD" \
135+
-DLLVM_ENABLE_PROJECTS="libcxx;libcxxabi" \
136+
-DLLVM_BINUTILS_INCDIR="/usr/include/" \
137+
$extra_args \
138+
$LLVM_SRC/llvm
139+
}
140+
127141
# 32-bit libraries.
128142
mkdir -p $WORK/i386
129143
cd $WORK/i386
130-
cmake_llvm $CMAKE_EXTRA_ARGS \
144+
cmake_libcxx $CMAKE_EXTRA_ARGS \
131145
-DCMAKE_INSTALL_PREFIX=/usr/i386/ \
132146
-DCMAKE_C_FLAGS="-m32" \
133147
-DCMAKE_CXX_FLAGS="-m32"
@@ -145,7 +159,7 @@ cat <<EOF > $WORK/msan/blocklist.txt
145159
fun:__gxx_personality_*
146160
EOF
147161

148-
cmake_llvm $CMAKE_EXTRA_ARGS \
162+
cmake_libcxx $CMAKE_EXTRA_ARGS \
149163
-DLLVM_USE_SANITIZER=Memory \
150164
-DCMAKE_INSTALL_PREFIX=/usr/msan/ \
151165
-DCMAKE_CXX_FLAGS="-fsanitize-blacklist=$WORK/msan/blocklist.txt"
@@ -158,7 +172,7 @@ rm -rf $WORK/msan
158172
mkdir -p $WORK/dfsan
159173
cd $WORK/dfsan
160174

161-
cmake_llvm $CMAKE_EXTRA_ARGS \
175+
cmake_libcxx $CMAKE_EXTRA_ARGS \
162176
-DLLVM_USE_SANITIZER=DataFlow \
163177
-DCMAKE_INSTALL_PREFIX=/usr/dfsan/
164178

@@ -197,7 +211,7 @@ rm -rf /usr/local/bin/llvm-*
197211
mv $LLVM_TOOLS_TMPDIR/* /usr/local/bin/
198212
rm -rf $LLVM_TOOLS_TMPDIR
199213

200-
# Remove binaries from LLVM buld that we don't need.
214+
# Remove binaries from LLVM build that we don't need.
201215
rm -f \
202216
/usr/local/bin/bugpoint \
203217
/usr/local/bin/llc \

projects/libtasn1/project.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ fuzzing_engines:
1010
- afl
1111
- libfuzzer
1212
- honggfuzz
13-
- dataflow
1413
sanitizers:
1514
- address
1615
- memory
1716
- undefined
18-
- dataflow
1917
main_repo: 'https://gitlab.com/gnutls/libtasn1.git'

projects/nestegg/project.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ fuzzing_engines:
55
- afl
66
- libfuzzer
77
- honggfuzz
8-
- dataflow
98
sanitizers:
109
- address
1110
- memory
1211
- undefined
13-
- dataflow
1412
vendor_ccs:
1513
- "twsmith@mozilla.com"
1614
main_repo: 'https://github.com/kinetiknz/nestegg.git'

projects/yajl-ruby/project.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ fuzzing_engines:
55
- libfuzzer
66
- afl
77
- honggfuzz
8-
- dataflow
98
sanitizers:
109
- address
1110
- undefined
1211
- memory
13-
- dataflow
1412
auto_ccs:
1513
- aaron.patterson@gmail.com
1614
- jonathan@titanous.com

0 commit comments

Comments
 (0)