Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync with main #4049

Merged
merged 112 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
e87f7a9
Fix Windows compile error when uvwasi is enabled (#3810)
wenyongh Sep 25, 2024
86926aa
Fix unused param warning when GC is enabled (#3814)
palchikov Sep 25, 2024
5ce6f90
Add scoreboard CI for supply-chain security (#3819)
TianlongLiang Sep 27, 2024
438b81b
Fix missing symbols when using aot mode on riscv platforms (#3812)
Kvencc Sep 28, 2024
0e05b0a
Add CODEOWNERS (#3822)
lum1n0us Sep 29, 2024
bd8c7a3
build(deps): bump github/codeql-action from 2.2.4 to 3.26.9
dependabot[bot] Sep 30, 2024
2baac8d
build(deps): bump actions/upload-artifact from 3.1.0 to 4.4.0
dependabot[bot] Sep 30, 2024
2e60f37
build(deps): bump ossf/scorecard-action from 2.3.1 to 2.4.0
dependabot[bot] Sep 30, 2024
e07ac1f
Merge pull request #3826 from bytecodealliance/dependabot/github_acti…
loganek Oct 5, 2024
5f3d36b
Merge pull request #3827 from bytecodealliance/dependabot/github_acti…
loganek Oct 5, 2024
e0027f3
Merge pull request #3828 from bytecodealliance/dependabot/github_acti…
loganek Oct 5, 2024
72872cb
Fix mac build of libc_emcc_wrapper.c (#3836)
bnason-nf Oct 5, 2024
0c4b2da
aot_comp_option.h: Add missing stdint.h header (#3834)
sjamesr Oct 7, 2024
f9153fb
build(deps): bump github/codeql-action from 3.26.9 to 3.26.11 (#3843)
dependabot[bot] Oct 8, 2024
6b4d8aa
Emit load_addr and load_size if WAMR_ENABLE_COMPILER is set (#3835)
sjamesr Oct 8, 2024
30539bf
Fix compilation error found in tflite test (#3820)
lum1n0us Oct 8, 2024
deacb7a
Fix exec_env_tls assertion in module instantiation (#3844)
wenyongh Oct 8, 2024
2b5e2d9
libc-emcc: Use alternate method to check getrandom support (#3848)
bnason-nf Oct 10, 2024
36d4380
Support table64 extension in classic-interp and AOT running modes (#3…
TianlongLiang Oct 11, 2024
b16b604
Enable libc-wasi for windows msvc build (#3852)
wenyongh Oct 14, 2024
e2680e5
Remove unused folder samples/gui and samples/littlevgl (#3853)
wenyongh Oct 14, 2024
7d4b530
build(deps): bump actions/upload-artifact from 4.4.0 to 4.4.3 (#3855)
dependabot[bot] Oct 14, 2024
0152e2c
build(deps): bump github/codeql-action from 3.26.11 to 3.26.12 (#3856)
dependabot[bot] Oct 14, 2024
b038f27
Merge pull request #3823 from bytecodealliance/dev/shared_heap
wenyongh Oct 15, 2024
327374c
Fix some compile warnings and typos (#3854)
wenyongh Oct 15, 2024
1af4740
Add Windows wamrc and iwasm build in release CI (#3857)
TianlongLiang Oct 17, 2024
7e625a0
Fix syntax error in codeql_buildscript.sh (#3864)
TianlongLiang Oct 17, 2024
74d2427
Allow to set native stack boundary to exec_env (#3862)
wenyongh Oct 18, 2024
48eaa22
Refine wasm/aot function instance lookup (#3865)
wenyongh Oct 18, 2024
bb3f8d9
release CI: Add another iwasm binary that supports Garbage Collection…
TianlongLiang Oct 21, 2024
87588ca
Fix lookup function issue reported in nightly run (#3868)
wenyongh Oct 21, 2024
3ad9530
Fix quadratic runtime for duplicate export name detection (#3861)
sjamesr Oct 21, 2024
b34b2c8
Add token permissions for CIs to fix issues reported by scorecard (#3…
TianlongLiang Oct 22, 2024
fe13f6d
build(deps): bump github/codeql-action from 3.26.12 to 3.26.13 (#3869)
dependabot[bot] Oct 22, 2024
217ba3b
Update release notes and update version to 2.2.0 (#3863)
Zzzabiyaka Oct 22, 2024
7d56289
Exclude fuzz test python and npm packages in scoreboard scan (#3871)
TianlongLiang Oct 23, 2024
6426fc4
Fix out of bounds issues after memory.grow on non-aot non-threads bui…
Zzzabiyaka Oct 23, 2024
a713ba1
fix(ios): Remove `float-abi` flag (#3889)
xdoardo Oct 29, 2024
483c57d
build(deps): bump github/codeql-action from 3.26.13 to 3.27.0 (#3888)
dependabot[bot] Oct 29, 2024
a3960c8
Refine looking up aot function with index (#3882)
wenyongh Oct 29, 2024
95edef3
Bump AOT_CURRENT_VERSION for WAMR 2.x (gc, memory64) (#3880)
yamt Oct 29, 2024
1138435
Fix mmap flags for AOT loader on non-Linux SGX platforms (#3890)
lum1n0us Oct 30, 2024
c7b2683
Fix out of bounds issue in is_native_addr_in_shared_heap function (#3…
lum1n0us Oct 31, 2024
e352f0a
Refactor AOT loader to support compatible versions (#3891)
lum1n0us Nov 1, 2024
bf78863
Wasm loader enhancement: check code size in code entry (#3892)
TianlongLiang Nov 7, 2024
397f663
fix(uwp): Gate NTSTATUS definition behind WINAPI_PARTITION_DESKTOP fo…
fadss Nov 8, 2024
58f242f
Merge pull request #3897 from bafadumi/main
loganek Nov 12, 2024
fdda259
Fix linked global initialization in multimodule (#3905)
sjamesr Nov 13, 2024
75f5fa4
build(deps): bump github/codeql-action from 3.27.0 to 3.27.1 (#3902)
dependabot[bot] Nov 13, 2024
226bf22
GlobalValueSet was moved to IRPartitionLayer recently, but we have a …
sjamesr Nov 13, 2024
0e4dffc
Fix a leak in wasm_loader_emit_br_info (#3900)
TianlongLiang Nov 13, 2024
0119b17
Correct the table index calculation in aot_instantiation (#3903)
lum1n0us Nov 18, 2024
2975e2f
build(deps): bump github/codeql-action from 3.27.1 to 3.27.4 (#3912)
dependabot[bot] Nov 19, 2024
f2b87d7
Support external toolchain on Windows for aot compiler (#3911)
TianlongLiang Nov 19, 2024
f1d03db
Fix CI wamr-ide error (#3913)
TianlongLiang Nov 20, 2024
62aca17
Check possible integer overflow in aot memory boundary check (#3920)
TianlongLiang Nov 22, 2024
00c2aa1
Drop declarative elements on module instantiation (#3922)
sjamesr Nov 24, 2024
9d8150e
Fix WASI Path Mapping Processing (#3923)
dpjohnst Nov 24, 2024
dbdf3df
Use plain assignment rather than bh_memcpy_s (#3924)
sjamesr Nov 24, 2024
b0c6d5c
add testcases for shared heap and fix POP_MEM_OFFSET of memory64 (#3916)
WenLY1 Nov 24, 2024
1d111a3
Fix loader small bug (#3928)
TianlongLiang Nov 26, 2024
7b553cd
Enable ref types by default (#3894)
Zzzabiyaka Nov 27, 2024
27d96aa
Update README.md to clarify Windows toolchain support and ESP-IDF ref…
lum1n0us Nov 27, 2024
fd91b51
build(deps): bump github/codeql-action from 3.27.4 to 3.27.5 (#3931)
dependabot[bot] Nov 28, 2024
8698d22
add thread cpu time for zephyr (#3937)
TianlongLiang Nov 28, 2024
e09613c
support WASM_FUNCREF return type in argv_to_results (#3936)
sjamesr Nov 28, 2024
838dd81
don't return an uninitialized trap if argv_to_results fails (#3935)
sjamesr Nov 28, 2024
739efd7
Fix incorrect assignment in win_file.c (#3939)
dpjohnst Dec 1, 2024
aabe830
Improvements for platform thread APIs on Windows and Zephyr (#3941)
TianlongLiang Dec 6, 2024
c32a6ce
Refactor SConscript and add file checks in iwasm.c (#3945)
zhkag Dec 6, 2024
f665e7b
build(deps): bump github/codeql-action from 3.27.5 to 3.27.6
dependabot[bot] Dec 9, 2024
591b740
Consume the placeholders that were put when emitting table info (#3940)
lum1n0us Dec 10, 2024
bebdd4a
Fix aot table instantiate (#3946)
wenyongh Dec 10, 2024
1fb0862
Merge pull request #3951 from bytecodealliance/dependabot/github_acti…
loganek Dec 10, 2024
9563909
set alignment 4 when loading multi return value (#3955)
TianlongLiang Dec 12, 2024
296c3cc
wasm_export.h: Use "default" visibility for gcc and clang (#3957)
midokura-xavi92 Dec 19, 2024
09c2abd
build(deps): Bump github/codeql-action from 3.27.6 to 3.27.9 (#3960)
dependabot[bot] Dec 19, 2024
932eb5d
Only access Zephyr thread stats info when it's available (#3962)
TianlongLiang Dec 19, 2024
9916813
top-level cmakefile: fix macOS build (#3968)
yamt Dec 19, 2024
8d51a3c
use a random secret key (#3971)
lum1n0us Dec 19, 2024
f8f37c8
[fuzzing] Enable instantiation (#3958)
lum1n0us Dec 19, 2024
9598611
CMakeLists.txt: Do not require C++ (#3956)
midokura-xavi92 Dec 20, 2024
4cda74a
add reference type support by default for darwin to support WASI-SDK-…
woodsmc Dec 22, 2024
040e776
top-level cmake: link llvm libraries to our shared library (#3973)
yamt Dec 23, 2024
8ac0649
Set thread information earlier in exec_env creation (#3967)
sjamesr Dec 23, 2024
70bec14
Add Tianlong into code owners (#3970)
lum1n0us Dec 24, 2024
bf2f366
build(deps): Bump github/codeql-action from 3.27.9 to 3.28.0 (#3982)
dependabot[bot] Dec 25, 2024
04f1071
build(deps): Bump actions/upload-artifact from 4.4.3 to 4.5.0 (#3981)
dependabot[bot] Dec 25, 2024
9b80766
Break aot_create_comp_data into small functions
no1wudi Dec 25, 2024
38cf274
Optimize memory initialization handling in AOT loader (#3983)
no1wudi Dec 26, 2024
24ecee8
Merge pull request #3987 from no1wudi/fix
no1wudi Dec 28, 2024
7f3e0df
Handle a new scenario where an item is both exported and imported. (#…
lum1n0us Dec 29, 2024
31ff576
Error message improvement (#4000)
loganek Jan 3, 2025
099056b
Ensure __heap_base and __data_end global indices are validated agains…
lum1n0us Jan 3, 2025
1958808
Fix table index calculations in wasm_loader and wasm_mini_loader (#4004)
lum1n0us Jan 5, 2025
1807eec
Add an example of how to embed WAMR in Zephyr user mode (#3998)
TianlongLiang Jan 5, 2025
9989b1c
[fuzzing] Use software bound-check during fuzzing (#4003)
lum1n0us Jan 6, 2025
a653746
Check whether related table has funcref elem in opcode call_indirect …
TianlongLiang Jan 6, 2025
02683d2
Improve stack consistency by ensuring sufficient space for dummy offs…
lum1n0us Jan 9, 2025
902f7d2
Add documentation regarding security issues and the status of Wasm pr…
lum1n0us Jan 9, 2025
53da420
Enable shrunk memory by default and add related configurations (#4008)
lum1n0us Jan 12, 2025
0d20521
build(deps): Bump actions/upload-artifact from 4.5.0 to 4.6.0 (#4021)
dependabot[bot] Jan 14, 2025
946430f
build(deps): Bump github/codeql-action from 3.28.0 to 3.28.1 (#4020)
dependabot[bot] Jan 14, 2025
9c3807e
Refine read leb int wasm loader of fast interpreter (#4017)
wenyongh Jan 14, 2025
1ac62e1
.github: Add shared lib builds (#3975)
midokura-xavi92 Jan 15, 2025
ba75b8f
fixes for compiling on windows (#4026)
malytomas Jan 17, 2025
831e4bb
Refine getting const offsets in wasm loader of fast-interp (#4012)
wenyongh Jan 20, 2025
e3ddbd5
Synchronize the GC spec tests to the commit from December 9. 2024. (#…
lum1n0us Jan 20, 2025
b6dea22
Fix wasm loader check data segment count (#4039)
TianlongLiang Jan 21, 2025
5dcffaa
Update Rust target from 'wasm32-wasi' to 'wasm32-wasip1' in CI (#4050)
TianlongLiang Feb 1, 2025
6f0e0e5
build(deps): Bump github/codeql-action from 3.28.1 to 3.28.5
dependabot[bot] Jan 27, 2025
7f1e612
build(deps): Bump github/codeql-action from 3.28.5 to 3.28.8
dependabot[bot] Feb 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add Windows wamrc and iwasm build in release CI (#3857)
- For Windows, llvm libs need to cache more directories, so use a multi-line
  environment variable for paths
- Remove conditionally build directories `win32build`, just use `build` for all platform
- Add Windows wamrc and iwasm(disable lib pthread semaphore and fast jit for now)
  build in release CI
  • Loading branch information
TianlongLiang authored Oct 17, 2024
commit 1af474099ba26be7d597ccbfcd6222161ea1086e
12 changes: 11 additions & 1 deletion .github/workflows/build_iwasm_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
fail-on-cache-miss: true

- name: generate iwasm binary release
shell: bash
run: |
cmake -S . -B build \
-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_JIT=1 \
Expand Down Expand Up @@ -81,7 +82,16 @@ jobs:
cmake --build build --config Release --parallel 4
working-directory: ${{ inputs.cwd }}

- name: compress the binary
- name: Compress the binary on Windows
if: inputs.runner == 'windows-latest'
run: |
tar -czf iwasm-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz iwasm.exe
Compress-Archive -Path iwasm.exe -DestinationPath iwasm-${{ inputs.ver_num }}-${{ inputs.runner }}.zip
mv iwasm-${{ inputs.ver_num }}-${{ inputs.runner }}.* ../
working-directory: ${{ inputs.cwd }}/build/Release

- name: compress the binary on non-Windows
if: inputs.runner != 'windows-latest'
run: |
tar czf iwasm-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz iwasm
zip iwasm-${{ inputs.ver_num }}-${{ inputs.runner }}.zip iwasm
Expand Down
27 changes: 23 additions & 4 deletions .github/workflows/build_llvm_libraries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:

- name: install dependencies for non macos-14
if: inputs.os != 'macos-14'
shell: bash
run: /usr/bin/env python3 -m pip install -r requirements.txt
working-directory: build-scripts

Expand All @@ -51,18 +52,23 @@ jobs:
run: /usr/bin/env python3 -m pip install -r requirements.txt --break-system-packages
working-directory: build-scripts

- name: retrieve the last commit ID
- name: Retrieve the last commit ID
id: get_last_commit
run: echo "last_commit=$(GH_TOKEN=${{ secrets.GITHUB_TOKEN }} /usr/bin/env python3 ./build_llvm.py ${{ inputs.extra_build_llvm_options }} --llvm-ver)" >> $GITHUB_OUTPUT
working-directory: build-scripts
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
echo "last_commit=$(GH_TOKEN=${{ secrets.GITHUB_TOKEN }} /usr/bin/env python3 ./build_llvm.py ${{ inputs.extra_build_llvm_options }} --llvm-ver)" >> $GITHUB_OUTPUT

# Bump the prefix number to evict all previous caches and
# enforce a clean build, in the unlikely case that some
# weird build error occur and llvm/build becomes a potential
# suspect.
- name: form the cache key of libraries
id: create_lib_cache_key
run: echo "key=0-llvm-libraries-${{ inputs.os }}-${{ inputs.arch }}-${{ steps.get_last_commit.outputs.last_commit }}${{ inputs.cache_key_suffix }}" >> $GITHUB_OUTPUT
shell: bash
run: |
echo "key=0-llvm-libraries-${{ inputs.os }}-${{ inputs.arch }}-${{ steps.get_last_commit.outputs.last_commit }}${{ inputs.cache_key_suffix }}" >> $GITHUB_OUTPUT

- name: Cache LLVM libraries
id: retrieve_llvm_libs
Expand Down Expand Up @@ -107,7 +113,20 @@ jobs:
- run: brew install ccache ninja
if: steps.retrieve_llvm_libs.outputs.cache-hit != 'true' && startsWith(inputs.os, 'macos')

- uses: actions/cache@v4

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 0: GitHub-owned GitHubAction not pinned by hash
Remediation tip: update your workflow using https://app.stepsecurity.io
Click Remediation section below for further remediation help
with:
path: ~/.cache/ccache
key: 0-ccache-${{ inputs.os }}-${{ steps.get_last_commit.outputs.last_commit }}
restore-keys: |
0-ccache-${{ inputs.os }}
if: steps.retrieve_llvm_libs.outputs.cache-hit != 'true' && inputs.os == 'windows-latest'

# Install tools on Windows
- run: choco install -y ccache ninja
if: steps.retrieve_llvm_libs.outputs.cache-hit != 'true' && inputs.os == 'windows-latest'

Check warning

Code scanning / Scorecard

Pinned-Dependencies Medium

score is 0: chocoCommand not pinned by hash
Click Remediation section below to solve this issue

- name: Build LLVM libraries
if: steps.retrieve_llvm_libs.outputs.cache-hit != 'true'
shell: bash
run: /usr/bin/env python3 ./build_llvm.py ${{ inputs.extra_build_llvm_options }} --arch ${{ inputs.arch }}
working-directory: build-scripts
12 changes: 10 additions & 2 deletions .github/workflows/build_wamrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,16 @@ jobs:
cmake --build build --config Release --parallel 4
working-directory: wamr-compiler

- name: compress the binary
if: inputs.release
- name: Compress the binary on Windows
if: inputs.runner == 'windows-latest' && inputs.release
run: |
tar -czf wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz wamrc.exe
Compress-Archive -Path wamrc.exe -DestinationPath wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.zip
mv wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.* ../
working-directory: wamr-compiler/build/Release

- name: compress the binary on non-Windows
if: inputs.runner != 'windows-latest' && inputs.release
run: |
tar czf wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.tar.gz wamrc
zip wamrc-${{ inputs.ver_num }}-${{ inputs.runner }}.zip wamrc
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/release_process.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,13 @@ jobs:
os: "macos-13"
arch: "AArch64 ARM Mips RISCV X86"

build_llvm_libraries_on_windows:
needs: [create_tag, create_release]
uses: ./.github/workflows/build_llvm_libraries.yml
with:
os: "windows-latest"
arch: "AArch64 ARM Mips RISCV X86"

#
# WAMRC
release_wamrc_on_ubuntu_2004:
Expand Down Expand Up @@ -103,6 +110,16 @@ jobs:
runner: macos-13
upload_url: ${{ needs.create_release.outputs.upload_url }}
ver_num: ${{ needs.create_tag.outputs.new_ver }}

release_wamrc_on_windows:
needs: [create_tag, create_release, build_llvm_libraries_on_windows]
uses: ./.github/workflows/build_wamrc.yml
with:
llvm_cache_key: ${{ needs.build_llvm_libraries_on_windows.outputs.cache_key }}
release: true
runner: windows-latest
upload_url: ${{ needs.create_release.outputs.upload_url }}
ver_num: ${{ needs.create_tag.outputs.new_ver }}

#
# IWASM
Expand Down Expand Up @@ -136,6 +153,16 @@ jobs:
upload_url: ${{ needs.create_release.outputs.upload_url }}
ver_num: ${{ needs.create_tag.outputs.new_ver}}

release_iwasm_on_windows:
needs: [create_tag, create_release, build_llvm_libraries_on_windows]
uses: ./.github/workflows/build_iwasm_release.yml
with:
cwd: product-mini/platforms/windows
llvm_cache_key: ${{ needs.build_llvm_libraries_on_windows.outputs.cache_key }}
runner: windows-latest
upload_url: ${{ needs.create_release.outputs.upload_url }}
ver_num: ${{ needs.create_tag.outputs.new_ver}}

#
# WAMR_SDK
release_wamr_sdk_on_ubuntu_2004:
Expand Down
36 changes: 32 additions & 4 deletions build-scripts/build_llvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,7 @@ def build_llvm(llvm_dir, platform, backends, projects, use_clang=False, extra_fl
if not llvm_dir.exists():
raise Exception(f"{llvm_dir} doesn't exist")

build_dir = llvm_dir.joinpath(
"win32build" if "windows" == platform else "build"
).resolve()
build_dir = llvm_dir.joinpath("build").resolve()
build_dir.mkdir(exist_ok=True)

lib_llvm_core_library = build_dir.joinpath("lib/libLLVMCore.a").resolve()
Expand Down Expand Up @@ -178,6 +176,7 @@ def repackage_llvm(llvm_dir):
raise Exception("Find more than one LLVM-*.tar.gz")

if not packs:
raise Exception("Didn't find any LLVM-* package")
return

llvm_package = packs[0].name
Expand All @@ -193,6 +192,31 @@ def repackage_llvm(llvm_dir):
# rm ./LLVM-1*.gz
os.remove(llvm_dir.joinpath(llvm_package).resolve())

def repackage_llvm_windows(llvm_dir):
build_dir = llvm_dir.joinpath("./build").resolve()

packs_path = [f for f in build_dir.glob("./_CPack_Packages/win64/NSIS/LLVM-*-win64")]
if len(packs_path) > 1:
raise Exception("Find more than one LLVM-* package")

if not packs_path:
raise Exception("Didn't find any LLVM-* package")
return

llvm_package_path = f"_CPack_Packages/win64/NSIS/{packs_path[0].name}"
windows_package_dir = build_dir.joinpath(llvm_package_path).resolve()

# mv package dir outside of build
shutil.move(str(windows_package_dir), str(llvm_dir))
# rm -r build
shutil.rmtree(str(build_dir))
# mkdir build
build_dir.mkdir()
# move back all the subdiretories under cpack directory(bin/include/lib) to build dir
moved_package_dir = llvm_dir.joinpath(packs_path[0].name)
for sub_dir in moved_package_dir.iterdir():
shutil.move(str(sub_dir), str(build_dir))
moved_package_dir.rmdir()

def main():
parser = argparse.ArgumentParser(description="build necessary LLVM libraries")
Expand Down Expand Up @@ -304,7 +328,11 @@ def main():
)
is not None
):
repackage_llvm(llvm_dir)
# TODO: repackage process may change in the future, this work for LLVM 15.x
if "windows" == platform:
repackage_llvm_windows(llvm_dir)
else:
repackage_llvm(llvm_dir)

return True
except subprocess.CalledProcessError:
Expand Down
3 changes: 0 additions & 3 deletions build-scripts/config_common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,6 @@ if (WAMR_BUILD_JIT EQUAL 1)
if (NOT DEFINED LLVM_DIR)
set (LLVM_SRC_ROOT "${WAMR_ROOT_DIR}/core/deps/llvm")
set (LLVM_BUILD_ROOT "${LLVM_SRC_ROOT}/build")
if (WAMR_BUILD_PLATFORM STREQUAL "windows")
set (LLVM_BUILD_ROOT "${LLVM_SRC_ROOT}/win32build")
endif ()
if (NOT EXISTS "${LLVM_BUILD_ROOT}")
message (FATAL_ERROR "Cannot find LLVM dir: ${LLVM_BUILD_ROOT}")
endif ()
Expand Down
11 changes: 10 additions & 1 deletion build-scripts/runtime_lib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,12 @@ if (WAMR_BUILD_INTERP EQUAL 1)
endif ()

if (WAMR_BUILD_FAST_JIT EQUAL 1)
include (${IWASM_DIR}/fast-jit/iwasm_fast_jit.cmake)
if (WAMR_BUILD_PLATFORM STREQUAL "windows")
message ("Fast JIT currently not supported on Windows")
set (WAMR_BUILD_FAST_JIT 0)
else ()
include (${IWASM_DIR}/fast-jit/iwasm_fast_jit.cmake)
endif ()
endif ()

if (WAMR_BUILD_JIT EQUAL 1)
Expand Down Expand Up @@ -104,6 +109,10 @@ if (WAMR_BUILD_WASI_NN EQUAL 1)
endif ()

if (WAMR_BUILD_LIB_PTHREAD EQUAL 1)
if (WAMR_BUILD_PLATFORM STREQUAL "windows")
set (WAMR_BUILD_LIB_PTHREAD_SEMAPHORE 0)
message ("Lib pthread semaphore currently not supported on Windows")
endif ()
include (${IWASM_DIR}/libraries/lib-pthread/lib_pthread.cmake)
# Enable the dependent feature if lib pthread is enabled
set (WAMR_BUILD_THREAD_MGR 1)
Expand Down
2 changes: 1 addition & 1 deletion core/iwasm/libraries/lib-pthread/lib_pthread.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set (LIB_PTHREAD_DIR ${CMAKE_CURRENT_LIST_DIR})
add_definitions (-DWASM_ENABLE_LIB_PTHREAD=1)

if (WAMR_BUILD_LIB_PTHREAD_SEMAPHORE EQUAL 1)
add_definitions (-DWASM_ENABLE_LIB_PTHREAD_SEMAPHORE=1)
add_definitions (-DWASM_ENABLE_LIB_PTHREAD_SEMAPHORE=1)
endif()

include_directories(${LIB_PTHREAD_DIR})
Expand Down
13 changes: 3 additions & 10 deletions wamr-compiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,17 +163,10 @@ endif()
# Enable LLVM
if (NOT WAMR_BUILD_WITH_CUSTOM_LLVM)
set (LLVM_SRC_ROOT "${PROJECT_SOURCE_DIR}/../core/deps/llvm")
if (WAMR_BUILD_PLATFORM STREQUAL "windows")
if (NOT EXISTS "${LLVM_SRC_ROOT}/win32build")
message (FATAL_ERROR "Cannot find LLVM dir: ${LLVM_SRC_ROOT}/win32build")
endif ()
set (CMAKE_PREFIX_PATH "${LLVM_SRC_ROOT}/win32build;${CMAKE_PREFIX_PATH}")
else()
if (NOT EXISTS "${LLVM_SRC_ROOT}/build")
message (FATAL_ERROR "Cannot find LLVM dir: ${LLVM_SRC_ROOT}/build")
endif ()
set (CMAKE_PREFIX_PATH "${LLVM_SRC_ROOT}/build;${CMAKE_PREFIX_PATH}")
if (NOT EXISTS "${LLVM_SRC_ROOT}/build")
message (FATAL_ERROR "Cannot find LLVM dir: ${LLVM_SRC_ROOT}/build")
endif ()
set (CMAKE_PREFIX_PATH "${LLVM_SRC_ROOT}/build;${CMAKE_PREFIX_PATH}")
endif ()

find_package(LLVM REQUIRED CONFIG)
Expand Down