Skip to content

Commit

Permalink
Don't build universal binaries by default (#366)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
BinyaminSharet authored and aquynh committed Jul 25, 2018
1 parent e4d73ee commit 3ea06c9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
7 changes: 5 additions & 2 deletions make-common.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
BUILDTYPE='Release'

# on MacOS, build universal binaries by default
ARCH='i386;x86_64'
# on MacOS, do not build universal binaries by default
ARCH=''

# by default we do NOT build 32bit on 64bit system
LLVM_BUILD_32_BITS=0
Expand All @@ -24,6 +24,9 @@ while [ "$1" != "" ]; do
macos-no-universal)
ARCH='' # do not build MacOS universal binaries
;;
macos-universal)
ARCH='i386;x86_64' # build MacOS universal binaries
;;
*)
echo "ERROR: unknown parameter \"$1\""
usage
Expand Down
5 changes: 3 additions & 2 deletions make-lib.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#!/bin/sh -e

# Build static library of Keystone Engine
# syntax: make-lib.sh [debug] [macos-no-universal] [lib32] [lib_only]
# syntax: make-lib.sh [debug] [macos-universal|macos-no-universal] [lib32] [lib_only]

usage()
{
echo ""
echo "Syntax: make-lib.sh [debug] [macos-universal] [lib64]"
echo ""
echo " debug: build with debug info"
echo " macos-no-universal: do not build MacOS universal binaries"
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 ""
Expand Down
5 changes: 3 additions & 2 deletions make-share.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
#!/bin/sh -e

# Build shared library of Keystone Engine
# syntax: make-share.sh [debug] [macos-no-universal] [lib32] [lib_only]
# 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-no-universal: do not build MacOS universal binaries"
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 ""
Expand Down

0 comments on commit 3ea06c9

Please sign in to comment.