Skip to content

Commit 63d849b

Browse files
libphonenumber: prepare for llvm 21 (#13930)
ref: #13915 (comment) Signed-off-by: David Korczynski <[email protected]>
1 parent cbce2a4 commit 63d849b

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

projects/libphonenumber/Dockerfile

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,13 @@ RUN apt-get update && apt-get install -y autoconf automake \
2222
libgflags-dev libgoogle-glog-dev libssl-dev \
2323
protobuf-compiler libtool wget default-jre icu-devtools
2424

25-
RUN apt-get install -y libgtest-dev && \
26-
cd /usr/src/googletest/googletest && \
27-
mkdir build && \
28-
cd build && \
29-
cmake .. && \
30-
make && \
31-
mkdir /usr/local/lib/googletest && \
32-
ln -sn /usr/local/lib/googletest/libgtest.a /usr/lib/libgtest.a && \
33-
ln -sn /usr/local/lib/googletest/libgtest_main.a /usr/lib/libgtest_main.a && \
34-
rm /lib/x86_64-linux-gnu/libgtest.a && \
35-
ln -sn /usr/local/lib/googletest/libgtest.a /lib/x86_64-linux-gnu/libgtest.a
25+
RUN git clone --depth 1 https://github.com/google/googletest && \
26+
cd $SRC/googletest && \
27+
mkdir build && \
28+
cd build && \
29+
cmake .. && \
30+
make -j$(nproc) && \
31+
make install
3632
RUN wget https://github.com/unicode-org/icu/releases/download/release-66-rc/icu4c-66rc-src.tgz && \
3733
tar xzvf icu4c-66rc-src.tgz
3834
RUN git clone https://github.com/google/protobuf.git && \

projects/libphonenumber/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#
1616
################################################################################
1717

18-
export CXXFLAGS="$CXXFLAGS -std=c++14"
18+
export CXXFLAGS="$CXXFLAGS -std=c++17"
1919

2020
# For coverage build we need to remove some flags when building protobuf and icu
2121
if [ "$SANITIZER" = "coverage" ]
@@ -69,7 +69,7 @@ fi
6969
# Build libphonenumber
7070
cd $SRC/libphonenumber/cpp
7171
sed -i 's/set (BUILD_SHARED_LIB true)/set (BUILD_SHARED_LIB false)/g' CMakeLists.txt
72-
sed -i 's/set(CMAKE_CXX_STANDARD 11/set(CMAKE_CXX_STANDARD 14/g' CMakeLists.txt
72+
sed -i 's/set(CMAKE_CXX_STANDARD 11/set(CMAKE_CXX_STANDARD 17/g' CMakeLists.txt
7373
sed -i 's/list (APPEND CMAKE_C_FLAGS "-pthread")/string (APPEND CMAKE_C_FLAGS " -pthread")/g' CMakeLists.txt
7474
sed -i 's/# Safeguarding/find_package(absl REQUIRED) # Safeguarding/g' CMakeLists.txt
7575

0 commit comments

Comments
 (0)