Skip to content

Commit 684c21e

Browse files
authored
GH-49898: [C++][CI] Use mold in more builds (#49899)
### Rationale for this change We're currently using the mold linker only on a couple of C++ builds. This PR uses it in more builds to get faster link times and thus faster CI builds. ### Are these changes tested? Yes, by CI builds. ### Are there any user-facing changes? No. * GitHub Issue: #49898 Authored-by: Antoine Pitrou <antoine@python.org> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent b3dcb6d commit 684c21e

3 files changed

Lines changed: 4 additions & 11 deletions

File tree

ci/docker/debian-13-cpp.dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ RUN apt-get update -y -q && \
7575
libzstd-dev \
7676
llvm-${llvm}-dev \
7777
make \
78+
mold \
7879
ninja-build \
7980
nlohmann-json3-dev \
8081
npm \
@@ -124,6 +125,7 @@ ENV ARROW_ACERO=ON \
124125
ARROW_S3=ON \
125126
ARROW_SUBSTRAIT=ON \
126127
ARROW_USE_CCACHE=ON \
128+
ARROW_USE_MOLD=ON \
127129
ARROW_WITH_BROTLI=ON \
128130
ARROW_WITH_BZ2=ON \
129131
ARROW_WITH_LZ4=ON \

ci/docker/fedora-42-cpp.dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ RUN dnf update -y && \
5151
llvm-devel \
5252
lz4-devel \
5353
make \
54+
mold \
5455
ninja-build \
5556
openssl-devel \
5657
patch \
@@ -93,6 +94,7 @@ ENV ARROW_ACERO=ON \
9394
ARROW_S3=ON \
9495
ARROW_SUBSTRAIT=ON \
9596
ARROW_USE_CCACHE=ON \
97+
ARROW_USE_MOLD=ON \
9698
ARROW_WITH_BROTLI=ON \
9799
ARROW_WITH_BZ2=ON \
98100
ARROW_WITH_LZ4=ON \

cpp/cmake_modules/DefineOptions.cmake

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,17 +110,6 @@ macro(resolve_option_dependencies)
110110
if(MSVC_TOOLCHAIN)
111111
set(ARROW_USE_GLOG OFF)
112112
endif()
113-
# Tests are crashed with mold + sanitizer checks.
114-
if(ARROW_USE_ASAN
115-
OR ARROW_USE_TSAN
116-
OR ARROW_USE_UBSAN)
117-
if(ARROW_USE_MOLD)
118-
message(WARNING "ARROW_USE_MOLD is disabled when one of "
119-
"ARROW_USE_ASAN, ARROW_USE_TSAN or ARROW_USE_UBSAN is specified "
120-
"because it causes some problems.")
121-
set(ARROW_USE_MOLD OFF)
122-
endif()
123-
endif()
124113

125114
tsort_bool_option_dependencies()
126115
foreach(option_name ${ARROW_BOOL_OPTION_DEPENDENCIES_TSORTED})

0 commit comments

Comments
 (0)