Skip to content

Commit

Permalink
Fixing -no-lto options on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
maxieds committed Jun 2, 2021
1 parent 2900382 commit 806ab8b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions build-scripts/pkg-config-flags.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
#!/bin/bash

GREP=$(which grep);
SED=$(which sed);
if [[ "$(uname -s)" == "Darwin" ]]; then
GREP=$(which ggrep);
SED=$(which gsed);
fi

PKGCONFIG=`which pkg-config`
if [[ "$(uname -s)" == "Darwin" ]]; then
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH}:/usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/viennarna/lib/pkgconfig";
Expand Down Expand Up @@ -33,4 +40,6 @@ else
PKGOUT+=" -DTARGETOS_GENERIC_UNIX"
fi

PKGOUT=`echo $PKGOUT | $SED 's/-fno-lto//g' | $SED 's/-Wl,-fno-lto//g'`

echo $PKGOUT

0 comments on commit 806ab8b

Please sign in to comment.