Last active
April 10, 2019 23:03
-
-
Save Iainmon/fab1ecabf5a8f66622e2b0ddaffa2755 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build executable normally | |
shards build --release | |
# See dependant libraries | |
otool -L bin/EXECUTABLE | |
# Install any the static libs that are required | |
brew reinstall -s libgc | |
brew reinstall -s libevent | |
# Create a project libraries folder | |
mkdir vendor | |
# Copy newly installed static libs to project vendor folder | |
cp /usr/local/opt/bdw-gc/lib/libgc.a vendor | |
cp /usr/local/opt/libevent/lib/libevent.a vendor | |
# OPTIONAL (COMON LIBS) | |
sudo cp /usr/local/opt/openssl/lib/libssl.a vendor | |
sudo cp /usr/local/opt/openssl/lib/libcrypto.a vendor | |
# ENDOPTIONAL | |
# Build with using static libs in the project's vendor folder | |
shards build --release --link-flags="-L`pwd`/vendor" | |
# Test again | |
otool -L bin/EXECUTABLE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment