#!/bin/zsh # usage: tools/port/build_shim.sh NAME SRC... -> parity-out/libshim_NAME.dylib (port sources + port/tests/shim_NAME.cpp) R=${0:A:h:h:h} N=$1; shift clang++ -std=c++17 -DNDEBUG -DBOOST_NO_AUTO_PTR -D_LIBCPP_ENABLE_CXX17_REMOVED_AUTO_PTR -O0 -w -shared -fPIC -I$R/port/include "$@" $R/port/tests/shim_$N.cpp -o $R/parity-out/libshim_$N.dylib