Commit Graph

8 Commits

Author SHA1 Message Date
YAMAMOTO Takashi
654ac5feca
Use cmake POSITION_INDEPENDENT_CODE instead of hardcoding -pie -fPIE (#1598)
This fixes unused option warnings on -pie for macOS.
(On macOS cmake produces "-fPIE -Xlinker -pie")

Bump required cmake version to 3.14 for CheckPIESupported.

References:
https://cmake.org/cmake/help/latest/prop_tgt/POSITION_INDEPENDENT_CODE.html
https://cmake.org/cmake/help/latest/module/CheckPIESupported.html#module:CheckPIESupported
2022-10-19 01:51:18 +08:00
Wenyong Huang
9cf7b88bad
Enhance cmake makefiles (#1390)
Upgrade `cmake_minimum_required` from `(VERSION 2.8)` to `(VERSION 2.9)` to
yield the warning:
"Compatibility with CMake < 2.8.12 will be removed from a future version of CMake"

Add "-Wno-unused" for CMAKE_CXX_FLAGS to yield the compilation warnings
when build LLVM JIT.

Fix the link error when code coverage is enabled.
2022-08-18 16:27:01 +08:00
Cengizhan Pasaoglu
2746d29751
Make robust on choosing target assumption for X86_32 support (#1241)
When WAMR_BUILD_TARGET isn't set, choosing right target is decided
by checking `CMAKE_SIZEOF_VOID_P` variable. However, choosing `X86_32`
target is not doing specifically checking size of void pointer. It is kind
a fallback target for others.

This patch explicitly checks the size of void pointer before setting the target
to `X86_32` to fix the issue.
2022-06-27 20:30:31 +08:00
Timon Wong
6bcf048523
Fix aarch64 build support (#946)
CMAKE_SYSTEM_PROCESSOR by default uses `uname -m` which returns aarch64
for some arm64 hardware.
2022-01-11 14:08:21 +08:00
Wenyong Huang
0db04e0b8f
Fix some compile issues of samples (#690)
Fix compile errors of workloads due to emsdk version upgrade,
enable BUILD_TARGET auto set for some samples,
and call wasm_runtime_init_thread_env() for in thread routine which
was created by pthread_create but not runtime in spawn-thread sample.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-08-06 18:12:21 +08:00
Xiaokang Qin
264e189690
Add Windows support for C-API and Runtime API libraries and examples. (#379)
* Add Windows support for C-API and Runtime API libraries and examples.

Signed-off-by: Wu Zhongmin <vwzm@live.com>
Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>

* Address the review comments

Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>

* Rewrite the the bh_getopt to make it avaliable for more kinds of options

Signed-off-by: Wu Zhongmin <vwzm@live.com>
Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>

* Add the license header

Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>

Co-authored-by: Zhongmin Wu <vwzm@live.com>
2020-09-11 17:36:04 +08:00
qinxk-inter
049760b849
Fix the build issues on mac for some samples (#358)
Fix the build issues on mac for basic/multi-module/multi-thread/
simple/spawn-thread/wasm-c-api under samples.
And all these samples could be run as expected.

Signed-off-by: Xiaokang Qin <xiaokang.qxk@antgroup.com>
2020-08-21 15:14:04 +08:00
Shi Lei
67495919b0
Add a basic sample to show how native runtime invokes wasm apps in WAMR and how wasm apps invoke native functions. (#207)
* Add printingAdd print time for wamrc, fix posix mmap bug time for wamrc, fixed a posix mmap bug.

Change-Id: Ib6517b8a69cf022a1a6a74efa1f98155aec143bc

* Add a basic sample to show how native runtime invokes wasm app in WAMR, and how wasm app invokes native functions.

Change-Id: I700ae413ad5e9ea04540d5187952305e1ee92d73
2020-03-20 16:39:13 +08:00