mirror of
https://github.com/XRPLF/clio.git
synced 2026-08-19 03:30:53 +00:00
build: Link libatomic statically on Linux aarch64 (#3120)
This commit is contained in:
@@ -49,6 +49,18 @@ if(
|
||||
)
|
||||
endif()
|
||||
|
||||
# On aarch64, libatomic is required for atomic operations. It is not needed on x86_64.
|
||||
# Linking it statically on Linux
|
||||
if(
|
||||
CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64"
|
||||
AND CMAKE_SYSTEM_NAME STREQUAL "Linux"
|
||||
)
|
||||
target_link_options(
|
||||
clio_options
|
||||
INTERFACE -Wl,--push-state -Wl,-Bstatic -latomic -Wl,--pop-state
|
||||
)
|
||||
endif()
|
||||
|
||||
# Apply sanitizer instrumentation if requested and define SANITIZERS_ENABLED.
|
||||
# Must come before the modules and subdirectories below that key off it.
|
||||
include(Sanitizers)
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
FROM ubuntu:22.04
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends --no-install-suggests \
|
||||
libatomic1 \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN groupadd -g 10001 clio \
|
||||
&& useradd -u 10000 -g 10001 -s /bin/bash clio
|
||||
|
||||
|
||||
Reference in New Issue
Block a user