Skip to content

Commit

Permalink
Shared libs on
Browse files Browse the repository at this point in the history
  • Loading branch information
like-a-freedom committed Jan 29, 2025
1 parent 8444c59 commit 6b07477
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ ENV CMAKE_BUILD_PARALLEL_LEVEL=1
# ONNX specific settings
ENV ONNX_ML=1
ENV ONNX_BUILD_TESTS=OFF
ENV ONNX_USE_PROTOBUF_SHARED_LIBS=OFF
ENV ONNX_USE_PROTOBUF_SHARED_LIBS=ON

# CMake-specific flags
ENV CMAKE_ARGS=" \
-DONNX_USE_PROTOBUF_SHARED_LIBS=OFF \
-DONNX_USE_LITE_PROTO=ON \
-DONNX_USE_PROTOBUF_SHARED_LIBS=ON \
-DONNX_USE_LITE_PROTO=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_BUILD_TYPE=Release \
-DFETCHCONTENT_FULLY_DISCONNECTED=ON \
Expand All @@ -40,7 +40,7 @@ ENV CMAKE_ARGS=" \
# Compiler optimization and position-independent code
ENV CFLAGS="-O3 -fPIC"
ENV CXXFLAGS="-O3 -fPIC"
ENV LDFLAGS="-Wl,--no-as-needed -lprotobuf"
ENV LDFLAGS="-Wl,--no-as-needed -Wl,-Bsymbolic -lprotobuf"

# Linker flags
# ENV LDFLAGS="-Wl,--as-needed"
Expand Down

0 comments on commit 6b07477

Please sign in to comment.