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
2fdd772e
Commit
2fdd772e
authored
8 years ago
by
Nguyen Anh Quynh
Browse files
Options
Downloads
Patches
Plain Diff
make.sh: add 2 new options lib_only & lib32
parent
ef293831
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
CMakeLists.txt
+2
-0
2 additions, 0 deletions
CMakeLists.txt
make-common.sh
+13
-0
13 additions, 0 deletions
make-common.sh
make-lib.sh
+5
-3
5 additions, 3 deletions
make-lib.sh
make-share.sh
+4
-2
4 additions, 2 deletions
make-share.sh
with
24 additions
and
5 deletions
CMakeLists.txt
+
2
−
0
View file @
2fdd772e
...
...
@@ -44,8 +44,10 @@ if (NOT BUILD_SHARED_LIBS)
add_subdirectory
(
kstool
)
endif
()
else
()
if
(
NOT BUILD_LIBS_ONLY
)
add_subdirectory
(
kstool
)
endif
()
endif
()
# generate and install pkg-config.pc
FIND_PACKAGE
(
PkgConfig
)
...
...
This diff is collapsed.
Click to expand it.
make-common.sh
+
13
−
0
View file @
2fdd772e
...
...
@@ -7,8 +7,21 @@ ARCH='i386;x86_64'
# Examples are Fedora, Redhat, Suse.
LLVM_LIBDIR_SUFFIX
=
''
# by default we do NOT build 32bit on 64bit system
LLVM_BUILD_32_BITS
=
0
# by default we build libraries & kstool
# but we can skip kstool & build libraries only
BUILD_LIBS_ONLY
=
0
while
[
"
$1
"
!=
""
]
;
do
case
$1
in
lib_only
)
BUILD_LIBS_ONLY
=
1
;;
lib32
)
LLVM_BUILD_32_BITS
=
1
;;
lib64
)
LLVM_LIBDIR_SUFFIX
=
'64'
;;
...
...
This diff is collapsed.
Click to expand it.
make-lib.sh
+
5
−
3
View file @
2fdd772e
#!/bin/sh -e
# Build static library of Keystone Engine
# syntax: make-lib.sh [debug] [macos-universal] [lib64]
# syntax: make-lib.sh [debug] [macos-
no-
universal]
[lib32]
[lib64]
[lib_only]
usage
()
{
...
...
@@ -10,12 +10,14 @@ usage()
echo
""
echo
" debug: build with debug info"
echo
" macos-no-universal: do not build MacOS universal binaries"
echo
" lib64: install Linux x64 libraries in
\$
PREFIX/lib64"
echo
" lib_only: skip kstool & only build libraries"
echo
" lib32: build 32bit libraries on 64bit system"
echo
" lib64: install Linux x64 libraries in
\$
PREFIX/lib64 (Fedora/Redhat/Suse, etc)"
echo
""
}
.
"
$(
dirname
"
$0
"
)
"
/make-common.sh
cmake
-DLLVM_LIBDIR_SUFFIX
=
"
$LLVM_LIBDIR_SUFFIX
"
-DCMAKE_OSX_ARCHITECTURES
=
"
$ARCH
"
-DCMAKE_BUILD_TYPE
=
$BUILDTYPE
-DBUILD_SHARED_LIBS
=
OFF
-DLLVM_TARGETS_TO_BUILD
=
"all"
-G
"Unix Makefiles"
..
cmake
-DBUILD_LIBS_ONLY
=
$BUILD_LIBS_ONLY
-DLLVM_BUILD_32_BITS
=
"
$LLVM_BUILD_32_BITS
"
-DLLVM_LIBDIR_SUFFIX
=
"
$LLVM_LIBDIR_SUFFIX
"
-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
+
4
−
2
View file @
2fdd772e
#!/bin/sh -e
# Build shared library of Keystone Engine
# syntax: make-share.sh [debug] [macos-universal] [lib64]
# syntax: make-share.sh [debug] [macos-
no-
universal]
[lib32]
[lib64]
[lib_only]
usage
()
{
...
...
@@ -10,12 +10,14 @@ usage()
echo
""
echo
" debug: build with debug info"
echo
" macos-no-universal: do not build MacOS universal binaries"
echo
" lib_only: skip kstool & only build libraries"
echo
" lib32: build 32bit libraries on 64bit system"
echo
" lib64: install Linux x64 libraries in
\$
PREFIX/lib64 (Fedora/Redhat/Suse, etc)"
echo
""
}
.
"
$(
dirname
"
$0
"
)
"
/make-common.sh
cmake
-DLLVM_LIBDIR_SUFFIX
=
"
$LLVM_LIBDIR_SUFFIX
"
-DCMAKE_OSX_ARCHITECTURES
=
"
$ARCH
"
-DCMAKE_BUILD_TYPE
=
$BUILDTYPE
-DBUILD_SHARED_LIBS
=
ON
-DLLVM_TARGETS_TO_BUILD
=
"all"
-G
"Unix Makefiles"
..
cmake
-DBUILD_LIBS_ONLY
=
$BUILD_LIBS_ONLY
-DLLVM_BUILD_32_BITS
=
"
$LLVM_BUILD_32_BITS
"
-DLLVM_LIBDIR_SUFFIX
=
"
$LLVM_LIBDIR_SUFFIX
"
-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