Skip to content
Snippets Groups Projects
Commit 483ec414 authored by Nguyen Anh Quynh's avatar Nguyen Anh Quynh
Browse files

docs: instructions on how to compile selected architectures

parent 56d1a50f
No related branches found
No related tags found
No related merge requests found
...@@ -22,12 +22,27 @@ CMake is required to build keystone. ...@@ -22,12 +22,27 @@ CMake is required to build keystone.
$ cd build $ cd build
$ ../make-share.sh $ ../make-share.sh
By default, this builds all architectures, which is: AArch64, ARM, Hexagon,
Mips, PowerPC, Sparc, SystemZ & X86. To compile just some selected ones,
pass a semicolon-separated list of targets to LLVM_TARGETS_TO_BUILD,
like follows if we only want AArch64 & X86.
$ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DLLVM_TARGETS_TO_BUILD="AArch64, X86" -G "Unix Makefiles" ..
$ make -j8
You can also compile static a library with: You can also compile static a library with:
$ mkdir build $ mkdir build
$ cd build $ cd build
$ ../make-lib.sh $ ../make-lib.sh
Like above, this builds all architectures. To compile just some selected ones,
pass a semicolon-separated list of targets to LLVM_TARGETS_TO_BUILD,
like follows if we only want AArch64 & X86.
$ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DLLVM_TARGETS_TO_BUILD="AArch64, X86" -G "Unix Makefiles" ..
$ make -j8
2. Right after building, install Keystone. 2. Right after building, install Keystone.
......
...@@ -21,10 +21,25 @@ https://www.visualstudio.com ...@@ -21,10 +21,25 @@ https://www.visualstudio.com
$ ..\nmake-dll.bat $ ..\nmake-dll.bat
By default, this builds all architectures, which is: AArch64, ARM, Hexagon,
Mips, PowerPC, Sparc, SystemZ & X86. To compile just some selected ones,
pass a semicolon-separated list of targets to LLVM_TARGETS_TO_BUILD,
like follows if we only want AArch64 & X86.
$ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DLLVM_TARGETS_TO_BUILD="AArch64, X86" -G "NMake Makefiles" ..
$ nmake
To build LIB file, run: To build LIB file, run:
$ ..\nmake-lib.bat $ ..\nmake-lib.bat
Like above, this builds all architectures. To compile just some selected ones,
pass a semicolon-separated list of targets to LLVM_TARGETS_TO_BUILD,
like follows if we only want AArch64 & X86.
$ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF -DLLVM_TARGETS_TO_BUILD="AArch64, X86" -G "NMake Makefiles" ..
$ nmake
Find the generated libraries in build\llvm\lib\keystone.{dll,lib} Find the generated libraries in build\llvm\lib\keystone.{dll,lib}
In the case you build LIB file, a tool named "kstool.exe" is also In the case you build LIB file, a tool named "kstool.exe" is also
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment