compile osrm with clang

This commit is contained in:
Shautvast 2026-03-30 14:33:29 +02:00
parent 2e34128094
commit 65e87f8ab1

View file

@ -1,7 +1,7 @@
FROM docker.io/arm64v8/debian:bookworm AS builder FROM docker.io/arm64v8/debian:bookworm AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \ RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential cmake git pkg-config ca-certificates \ clang cmake git pkg-config ca-certificates \
libboost-all-dev libtbb-dev liblua5.4-dev \ libboost-all-dev libtbb-dev liblua5.4-dev \
libxml2-dev libzip-dev libbz2-dev \ libxml2-dev libzip-dev libbz2-dev \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
@ -11,7 +11,11 @@ RUN git clone --depth=1 --branch ${OSRM_VERSION} \
https://github.com/Project-OSRM/osrm-backend.git /osrm https://github.com/Project-OSRM/osrm-backend.git /osrm
RUN cd /osrm && mkdir build && cd build && \ RUN cd /osrm && mkdir build && cd build && \
cmake .. -DCMAKE_BUILD_TYPE=Release && \ cmake .. -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DOSRM_BUILD_TESTS=OFF \
-DOSRM_BUILD_TOOLS=OFF && \
make -j$(nproc) osrm-extract osrm-partition osrm-customize osrm-routed && \ make -j$(nproc) osrm-extract osrm-partition osrm-customize osrm-routed && \
make install make install