Commit Graph

26 Commits

Author SHA1 Message Date
Sun Daowen 5eab884244 compile on VS2008/VS2010 (#1397)
Compiling with Win32 Release/MinSizeRel/RelWithDebInfo in VS2008 will cause "fatal error C1063: compiler limit: compiler stack overflow" problem.
Compiling with Win32 Debug or x64 does not have this problem.
You can easily bypass this problem by changing the optimization options /O1 and /O2 to /Od.
In VS2010, when _INTPTR is 0 or 1, UINTPTR_MAX is 0xFFFFFFFF.
2021-10-12 08:50:22 +08:00
lazymio 0c976ec704
Don't build samples and tests to save time when fuzzing 2021-10-06 16:24:52 +02:00
lazymio 5572c3db43
Make oss-fuzz happy 2021-10-06 15:46:25 +02:00
lazymio 8540b64211
Force static linkage for fuzz executables 2021-10-06 15:36:12 +02:00
lazymio a4c6298302
Support building fuzz targets 2021-10-06 12:06:59 +02:00
mio ae1b6ad89b
Support building on Android arm aarch64 x86 x86_64
1. Add cmake support in CMakeLists.txt according to https://developer.android.com/ndk/guides/other_build_systems

2. Resolve symbols errors

3. Backport fixes from 438ed42311

   > QEMU relies on two optimization for ppc64 and arm:
   >
   > 1. if(0) /* optimized code */
   > 2. assert(0); /* optimized code */
   >
   > But the assert on mingw32 doesn't have noreturn attribute which prevents
   > the second optimization and some code is reverted to the original code
   > to fit in the first optimization.
   >
   > The assert implementation is copied from glib as qemu did.

   Unfortunately, NDK also doesn't have an assert implementation qemu prefers.
2021-10-06 04:42:44 +08:00
mio d6993e02c4
Link to libm to make sure our build works on older Linux 2021-10-05 12:47:27 +02:00
Nguyen Anh Quynh aaaea14214 import Unicorn2 2021-10-03 22:14:44 +08:00
Nguyen Anh Quynh 51665db668 Merge branch 'master' of github.com:unicorn-engine/unicorn 2021-05-16 21:38:17 +08:00
Nguyen Anh Quynh 2874435d2f bump version to 1.0.3 2021-05-16 21:38:08 +08:00
Sun Daowen 5790938452
compile on VS2008/VS2010 (#1397)
Compiling with Win32 Release/MinSizeRel/RelWithDebInfo in VS2008 will cause "fatal error C1063: compiler limit: compiler stack overflow" problem.
Compiling with Win32 Debug or x64 does not have this problem.
You can easily bypass this problem by changing the optimization options /O1 and /O2 to /Od.
In VS2010, when _INTPTR is 0 or 1, UINTPTR_MAX is 0xFFFFFFFF.
2021-05-16 21:36:33 +08:00
Duncan Ogilvie 4440310f14
Modernize CMake (#1373) 2021-03-30 23:32:56 +08:00
Carlo Bramini 4b34042e02
Make Unicorn buildable with MinGW (#1364)
* [WIN32] Allow to build also with MinGW

* [WIN32] Fix build for MinGW
2020-12-23 13:27:06 +08:00
Nguyen Anh Quynh 0bebb3e183 cmake: enable UNICORN_HAS_ARMEB when ARM is on 2020-11-17 15:13:16 +08:00
lazymio 644da9babc
Fix setjmp/longjmp on native Windows (#1331)
* Add setjmp wrapper

* Add to projects

* Use wrapper on x64

* Always build on x64 and exclude on win32

* Fix signature

* Add comments

* Add comments for os-win32.h

* Add extern decleration

* Support cmake Windows build

* Fix for MinGW
2020-09-22 02:02:43 +08:00
John Zimmermann 590bab8f1a
cmake: fix build if workdir is outside of CMAKE_BINARY_DIR (#1284)
this e.g. happens if you would try to compile this like this:

cmake -B build
cmake --build build --config Release
2020-06-06 12:54:06 +08:00
scribam ad80f042c4
cmake: add ARCHIVE rule to the install command (#1282) 2020-06-05 10:27:41 +08:00
John Zimmermann 605cfe8e02
cmake: fix static linking due to cyclic deps (#1278)
linking of samples like sample_arm do fail due to cyclic references in
the archives
2020-06-04 15:38:40 +08:00
scribam 5508d3aa32
cmake: fix typo "UNICRON" => "UNICORN" (#1277) 2020-06-03 10:13:32 +08:00
scribam db3235a65b
cmake: fix Visual Studio build (#1276) 2020-06-02 16:04:33 +08:00
scribam 582e6968fd
cmake: add option to build unicorn as a static library (#1275) 2020-06-01 00:00:07 +08:00
Nguyen Anh Quynh d7e61123ac cmake: spacing 2020-05-01 20:18:07 +08:00
Nguyen Anh Quynh 00bbe2ce7d we do not need Python to build anymore 2020-04-30 13:58:33 +08:00
Chen Huitao d5f088c85f
add host detection in CMakeLists.txt (#1244)
* fix finding python path which only has python3.

* add host detection.

* add ia64, ppc, s390 host detections.
2020-04-29 08:47:48 +08:00
Nguyen Anh Quynh 8ff326a2a3
fix finding python path which only has python3. (#1220) 2020-03-06 01:48:53 +08:00
Chen Huitao 60896de9f4 add CMakeList.txt. build windows binary by using vs2019. (#1134)
* add CMakeList.txt. build windows binary by using vs2019.

* remove macro redefinition warning.

* add nmake.bat.

* update CMakeLists.txt. build successfully on Ubuntu-1804-amd64.

* add CMakeList.txt. build windows binary by using vs2019.

* remove macro redefinition warning.

* add nmake.bat.

* update CMakeLists.txt. build successfully on Ubuntu-1804-amd64.

* Add build specific arch option.

* fix old MSVC inline and mipsel macro.

* add install target and option of embeded MSVCRT lib.

* add cmake.sh and document.

* add xwings and chenhuitao as programmer.

* fix COMPILE-CMAKE. rename txt to md.
2019-09-08 16:42:43 +08:00