Files
bsharet 3ea06c9ed3 Don't build universal binaries by default (#366)
* Don't build universal binaries by default

Starting Xcode 10 beta, there's no support for i386.
This commit changes the default build on iOS to regular libraries
instead of universal binaries.
Build of universal binaries is still supported with macos-universal.

* Add macos-no-universal option (compatibility)

Keep the default to be macos-no-universal, but add it as an option as
well for backward compatibility.
2018-07-26 00:29:31 +08:00

24 lines
849 B
Bash
Executable File

#!/bin/sh -e
# Build shared library of Keystone Engine
# syntax: make-share.sh [debug] [macos-universal|macos-no-universal] [lib32] [lib_only]
usage()
{
echo ""
echo "Syntax: make-share.sh [debug] [macos-universal] [lib64]"
echo ""
echo " debug: build with debug info"
echo " macos-universal: build MacOS universal binaries"
echo " macos-no-universal: do not build MacOS universal binaries (default)"
echo " lib_only: skip kstool & only build libraries"
echo " lib32: build 32bit libraries on 64bit system"
echo ""
}
. "$(dirname "$0")"/make-common.sh
cmake -DBUILD_LIBS_ONLY=$BUILD_LIBS_ONLY -DLLVM_BUILD_32_BITS="$LLVM_BUILD_32_BITS" -DCMAKE_OSX_ARCHITECTURES="$ARCH" -DCMAKE_BUILD_TYPE=$BUILDTYPE -DBUILD_SHARED_LIBS=ON -DLLVM_TARGETS_TO_BUILD="all" -G "Unix Makefiles" ..
make -j8