Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Keystone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Third Party Mirrors
Keystone
Commits
0faa856b
Commit
0faa856b
authored
8 years ago
by
Nguyen Anh Quynh
Browse files
Options
Downloads
Patches
Plain Diff
make-*sh now can build MacOS universal binaries
parent
7dc48f50
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/COMPILE-NIX.md
+10
-0
10 additions, 0 deletions
docs/COMPILE-NIX.md
make-lib.sh
+36
-12
36 additions, 12 deletions
make-lib.sh
make-share.sh
+36
-11
36 additions, 11 deletions
make-share.sh
with
82 additions
and
23 deletions
docs/COMPILE-NIX.md
+
10
−
0
View file @
0faa856b
...
...
@@ -22,6 +22,11 @@ For Windows, see [COMPILE-WINDOWS.md](COMPILE-WINDOWS.md)
$ cd build
$ ../make-share.sh
On Mac OS, to build universal binaries including both 32-bit & 64-bit code,
replace the last line with:
$ ../make-share.sh macos-universal
In the case you want to compile with all the debug information, replace the
last line with:
...
...
@@ -41,6 +46,11 @@ For Windows, see [COMPILE-WINDOWS.md](COMPILE-WINDOWS.md)
$ cd build
$ ../make-lib.sh
On Mac OS, to build universal binaries including both 32-bit & 64-bit code,
replace the last line with:
$ ../make-lib.sh macos-universal
In the case you want to compile with all the debug information, replace the
last line with:
...
...
This diff is collapsed.
Click to expand it.
make-lib.sh
+
36
−
12
View file @
0faa856b
#!/bin/sh -ex
# Run this with "debug" option to compile Keystone with debug info
if
[
-n
"
$1
"
]
then
# compile with DEBUG option
cmake
-DCMAKE_BUILD_TYPE
=
Debug
-DBUILD_SHARED_LIBS
=
OFF
-DLLVM_TARGETS_TO_BUILD
=
"all"
-G
"Unix Makefiles"
..
else
# default compile
cmake
-DCMAKE_BUILD_TYPE
=
Release
-DBUILD_SHARED_LIBS
=
OFF
-DLLVM_TARGETS_TO_BUILD
=
"all"
-G
"Unix Makefiles"
..
fi
#!/bin/sh -e
time
make
-j8
# Build static library of Keystone Engine
# syntax: make-lib.sh [debug] [macos-universal]
function
usage
()
{
echo
""
echo
"Syntax: make-lib.sh [debug] [macos-universal]"
echo
"
\t
debug: build with debug info"
echo
"
\t
macos-universal: build MacOS universal binaries"
echo
""
}
BUILDTYPE
=
'Release'
MACOS_UNIVERSAL
=
''
ARCH
=
''
while
[
"
$1
"
!=
""
]
;
do
case
$1
in
debug
)
BUILDTYPE
=
'Debug'
;;
macos-universal
)
ARCH
=
'i386;x86_64'
;;
*
)
echo
"ERROR: unknown parameter
\"
$1
\"
"
usage
exit
1
;;
esac
shift
done
cmake
-DCMAKE_OSX_ARCHITECTURES
=
"
$ARCH
"
-DCMAKE_BUILD_TYPE
=
$BUILDTYPE
-DBUILD_SHARED_LIBS
=
OFF
-DLLVM_TARGETS_TO_BUILD
=
"all"
-G
"Unix Makefiles"
..
time
make
-j8
This diff is collapsed.
Click to expand it.
make-share.sh
+
36
−
11
View file @
0faa856b
#!/bin/sh -xe
# Run this with "debug" option to compile Keystone with debug info
if
[
-n
"
$1
"
]
then
# compile with DEBUG option
cmake
-DCMAKE_BUILD_TYPE
=
Debug
-DBUILD_SHARED_LIBS
=
ON
-DLLVM_TARGETS_TO_BUILD
=
"all"
-G
"Unix Makefiles"
..
else
# default compile
cmake
-DCMAKE_BUILD_TYPE
=
Release
-DBUILD_SHARED_LIBS
=
ON
-DLLVM_TARGETS_TO_BUILD
=
"all"
-G
"Unix Makefiles"
..
fi
#!/bin/sh -e
# Build shared library of Keystone Engine
# syntax: make-share.sh [debug] [macos-universal]
function
usage
()
{
echo
""
echo
"Syntax: make-share.sh [debug] [macos-universal]"
echo
"
\t
debug: build with debug info"
echo
"
\t
macos-universal: build MacOS universal binaries"
echo
""
}
BUILDTYPE
=
'Release'
MACOS_UNIVERSAL
=
''
ARCH
=
''
while
[
"
$1
"
!=
""
]
;
do
case
$1
in
debug
)
BUILDTYPE
=
'Debug'
;;
macos-universal
)
ARCH
=
'i386;x86_64'
;;
*
)
echo
"ERROR: unknown parameter
\"
$1
\"
"
usage
exit
1
;;
esac
shift
done
cmake
-DCMAKE_OSX_ARCHITECTURES
=
"
$ARCH
"
-DCMAKE_BUILD_TYPE
=
$BUILDTYPE
-DBUILD_SHARED_LIBS
=
ON
-DLLVM_TARGETS_TO_BUILD
=
"all"
-G
"Unix Makefiles"
..
time
make
-j8
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment