3 Commits
Author SHA1 Message Date
andrew 7ad6872ee8 Use clang-19 in jenkins
weaselab/conflict-set/pipeline/head There was a failure building this commit
2024-10-15 15:55:33 -07:00
andrew 9db5eb960d Suppress some unhelpful warnings 2024-10-15 15:06:10 -07:00
andrew 5df25a138a Don't initialize max version if child doesn't exist 2024-10-15 12:55:28 -07:00
3 changed files with 27 additions and 8 deletions
+9
View File
@@ -33,6 +33,15 @@ endif()
add_compile_options(-fdata-sections -ffunction-sections -Wswitch-enum add_compile_options(-fdata-sections -ffunction-sections -Wswitch-enum
-Werror=switch-enum -fPIC) -Werror=switch-enum -fPIC)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
add_link_options("-Wno-unused-command-line-argument")
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options("-Wno-maybe-uninitialized")
endif()
if(NOT APPLE) if(NOT APPLE)
# This causes some versions of clang to crash on macos # This causes some versions of clang to crash on macos
add_compile_options(-g -fno-omit-frame-pointer) add_compile_options(-g -fno-omit-frame-pointer)
+9 -3
View File
@@ -1147,21 +1147,27 @@ ChildAndMaxVersion getChildAndMaxVersion(Node0 *, uint8_t) { return {}; }
ChildAndMaxVersion getChildAndMaxVersion(Node3 *self, uint8_t index) { ChildAndMaxVersion getChildAndMaxVersion(Node3 *self, uint8_t index) {
int i = getNodeIndex(self, index); int i = getNodeIndex(self, index);
if (i < 0) { if (i < 0) {
return {}; ChildAndMaxVersion result;
result.child = nullptr;
return result;
} }
return {self->children[i], self->childMaxVersion[i]}; return {self->children[i], self->childMaxVersion[i]};
} }
ChildAndMaxVersion getChildAndMaxVersion(Node16 *self, uint8_t index) { ChildAndMaxVersion getChildAndMaxVersion(Node16 *self, uint8_t index) {
int i = getNodeIndex(self, index); int i = getNodeIndex(self, index);
if (i < 0) { if (i < 0) {
return {}; ChildAndMaxVersion result;
result.child = nullptr;
return result;
} }
return {self->children[i], self->childMaxVersion[i]}; return {self->children[i], self->childMaxVersion[i]};
} }
ChildAndMaxVersion getChildAndMaxVersion(Node48 *self, uint8_t index) { ChildAndMaxVersion getChildAndMaxVersion(Node48 *self, uint8_t index) {
int i = self->index[index]; int i = self->index[index];
if (i < 0) { if (i < 0) {
return {}; ChildAndMaxVersion result;
result.child = nullptr;
return result;
} }
return {self->children[i], self->childMaxVersion[i]}; return {self->children[i], self->childMaxVersion[i]};
} }
+9 -5
View File
@@ -11,25 +11,27 @@ RUN TZ=America/Los_Angeles DEBIAN_FRONTEND=noninteractive apt-get install -y \
binutils-aarch64-linux-gnu \ binutils-aarch64-linux-gnu \
build-essential \ build-essential \
ccache \ ccache \
clang \
cmake \ cmake \
curl \ curl \
doxygen \
file \
g++-aarch64-linux-gnu \ g++-aarch64-linux-gnu \
gcovr \ gcovr \
git \ git \
gperf \ gnupg \
graphviz \
libc6-dbg \ libc6-dbg \
lsb-release \
ninja-build \ ninja-build \
pre-commit \ pre-commit \
python3-requests \ python3-requests \
qemu-user \ qemu-user \
rpm \ rpm \
software-properties-common \
texlive-full \ texlive-full \
wget \
zstd zstd
# Recent clang
RUN wget https://apt.llvm.org/llvm.sh && chmod +x ./llvm.sh && ./llvm.sh 19
# Install recent valgrind from source # Install recent valgrind from source
RUN curl -Ls https://sourceware.org/pub/valgrind/valgrind-3.22.0.tar.bz2 -o valgrind.tar.bz2 && \ RUN curl -Ls https://sourceware.org/pub/valgrind/valgrind-3.22.0.tar.bz2 -o valgrind.tar.bz2 && \
echo "c811db5add2c5f729944caf47c4e7a65dcaabb9461e472b578765dd7bf6d2d4c valgrind.tar.bz2" > valgrind-sha.txt && \ echo "c811db5add2c5f729944caf47c4e7a65dcaabb9461e472b578765dd7bf6d2d4c valgrind.tar.bz2" > valgrind-sha.txt && \
@@ -43,6 +45,8 @@ RUN curl -Ls https://sourceware.org/pub/valgrind/valgrind-3.22.0.tar.bz2 -o valg
cd .. && \ cd .. && \
rm -rf /tmp/* rm -rf /tmp/*
RUN apt-get install clang
# Set after building valgrind, which doesn't build with clang for some reason # Set after building valgrind, which doesn't build with clang for some reason
ENV CC=clang ENV CC=clang
ENV CXX=clang++ ENV CXX=clang++