Skip to content

Commit 3ea06c9

Browse files
BinyaminSharetaquynh
authored andcommitted
Don't build universal binaries by default (keystone-engine#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.
1 parent e4d73ee commit 3ea06c9

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

make-common.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
BUILDTYPE='Release'
22

3-
# on MacOS, build universal binaries by default
4-
ARCH='i386;x86_64'
3+
# on MacOS, do not build universal binaries by default
4+
ARCH=''
55

66
# by default we do NOT build 32bit on 64bit system
77
LLVM_BUILD_32_BITS=0
@@ -24,6 +24,9 @@ while [ "$1" != "" ]; do
2424
macos-no-universal)
2525
ARCH='' # do not build MacOS universal binaries
2626
;;
27+
macos-universal)
28+
ARCH='i386;x86_64' # build MacOS universal binaries
29+
;;
2730
*)
2831
echo "ERROR: unknown parameter \"$1\""
2932
usage

make-lib.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
#!/bin/sh -e
22

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

66
usage()
77
{
88
echo ""
99
echo "Syntax: make-lib.sh [debug] [macos-universal] [lib64]"
1010
echo ""
1111
echo " debug: build with debug info"
12-
echo " macos-no-universal: do not build MacOS universal binaries"
12+
echo " macos-universal: build MacOS universal binaries"
13+
echo " macos-no-universal: do not build MacOS universal binaries (default)"
1314
echo " lib_only: skip kstool & only build libraries"
1415
echo " lib32: build 32bit libraries on 64bit system"
1516
echo ""

make-share.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
#!/bin/sh -e
22

33
# Build shared library of Keystone Engine
4-
# syntax: make-share.sh [debug] [macos-no-universal] [lib32] [lib_only]
4+
# syntax: make-share.sh [debug] [macos-universal|macos-no-universal] [lib32] [lib_only]
55

66
usage()
77
{
88
echo ""
99
echo "Syntax: make-share.sh [debug] [macos-universal] [lib64]"
1010
echo ""
1111
echo " debug: build with debug info"
12-
echo " macos-no-universal: do not build MacOS universal binaries"
12+
echo " macos-universal: build MacOS universal binaries"
13+
echo " macos-no-universal: do not build MacOS universal binaries (default)"
1314
echo " lib_only: skip kstool & only build libraries"
1415
echo " lib32: build 32bit libraries on 64bit system"
1516
echo ""

0 commit comments

Comments
 (0)