Skip to content

Commit

Permalink
WIP: macOS: Remove unused functions
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Sep 19, 2023
1 parent e3585e7 commit d401a37
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build/lin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ mkdir ${TARGET}

# Default optimisation level is for binary size (-Os)
# Overriden to performance (-O3) for select dependencies that benefit
export FLAGS+=" -Os -fPIC"
export FLAGS+=" -Os -fPIC -ffunction-sections -fdata-sections"

# Force "new" C++11 ABI compliance
# Remove async exception unwind/backtrace tables
# Allow linker to remove unused sections
if [ "$LINUX" = true ]; then
export FLAGS+=" -D_GLIBCXX_USE_CXX11_ABI=1 -fno-asynchronous-unwind-tables -ffunction-sections -fdata-sections"
export FLAGS+=" -D_GLIBCXX_USE_CXX11_ABI=1 -fno-asynchronous-unwind-tables"
fi

# Common build paths and flags
Expand All @@ -59,6 +59,7 @@ if [ "$DARWIN" = true ]; then
mkdir -p $CARGO_HOME
mkdir -p $RUSTUP_HOME
export PATH="${CARGO_HOME}/bin:${PATH}"
export LDFLAGS+=" -Wl,-dead_strip"
if [ "$PLATFORM" == "darwin-arm64v8" ]; then
export DARWIN_ARM=true
fi
Expand Down

0 comments on commit d401a37

Please sign in to comment.