Skip to content

Commit 7dbbb34

Browse files
committed
Bump WAMR to 1.2.1
- bump llvm to 15.0.7 - bump wamr to 1.2.1 Signed-off-by: [email protected] <[email protected]>
1 parent 3af2c1a commit 7dbbb34

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

bazel/external/wamr.BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ cmake(
2020
"-GNinja",
2121
] + select({
2222
"@proxy_wasm_cpp_host//bazel:engine_wamr_jit": [
23-
"-DLLVM_DIR=$EXT_BUILD_DEPS/copy_llvm_13_0_1/llvm/lib/cmake/llvm",
23+
"-DLLVM_DIR=$EXT_BUILD_DEPS/copy_llvm-prj-15_0_7/llvm/lib/cmake/llvm",
2424
"-DWAMR_BUILD_AOT=1",
2525
"-DWAMR_BUILD_FAST_INTERP=0",
2626
"-DWAMR_BUILD_INTERP=0",
@@ -42,7 +42,7 @@ cmake(
4242
}),
4343
out_static_libs = ["libvmlib.a"],
4444
deps = select({
45-
"@proxy_wasm_cpp_host//bazel:engine_wamr_jit": ["@llvm-13_0_1//:llvm_13_0_1_lib"],
45+
"@proxy_wasm_cpp_host//bazel:engine_wamr_jit": ["@llvm-prj-15_0_7//:llvm_lib"],
4646
"//conditions:default": [],
4747
}),
4848
)

bazel/external/wamr_llvm.BUILD

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,27 @@ filegroup(
1010
)
1111

1212
cmake(
13-
name = "llvm_13_0_1_lib",
13+
name = "llvm_lib",
1414
cache_entries = {
1515
# Disable both: BUILD and INCLUDE, since some of the INCLUDE
1616
# targets build code instead of only generating build files.
17+
# Dsiable unncessary components
1718
"LLVM_BUILD_BENCHMARKS": "off",
1819
"LLVM_INCLUDE_BENCHMARKS": "off",
1920
"LLVM_BUILD_DOCS": "off",
2021
"LLVM_INCLUDE_DOCS": "off",
2122
"LLVM_BUILD_EXAMPLES": "off",
2223
"LLVM_INCLUDE_EXAMPLES": "off",
23-
"LLVM_BUILD_RUNTIME": "off",
24-
"LLVM_BUILD_RUNTIMES": "off",
25-
"LLVM_INCLUDE_RUNTIMES": "off",
2624
"LLVM_BUILD_TESTS": "off",
2725
"LLVM_INCLUDE_TESTS": "off",
2826
"LLVM_BUILD_TOOLS": "off",
2927
"LLVM_INCLUDE_TOOLS": "off",
30-
"LLVM_BUILD_UTILS": "off",
31-
"LLVM_INCLUDE_UTILS": "off",
3228
"LLVM_ENABLE_IDE": "off",
3329
"LLVM_ENABLE_LIBEDIT": "off",
3430
"LLVM_ENABLE_LIBXML2": "off",
3531
"LLVM_ENABLE_TERMINFO": "off",
3632
"LLVM_ENABLE_ZLIB": "off",
33+
"LLVM_ENABLE_ZSTD": "off",
3734
"LLVM_TARGETS_TO_BUILD": "X86",
3835
"CMAKE_CXX_FLAGS": "-Wno-unused-command-line-argument",
3936
},
@@ -133,4 +130,5 @@ cmake(
133130
"libLLVMSupport.a",
134131
"libLLVMDemangle.a",
135132
],
133+
working_directory = "llvm",
136134
)

bazel/repositories.bzl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ def proxy_wasm_cpp_host_repositories():
159159
http_archive,
160160
name = "com_github_bytecodealliance_wasm_micro_runtime",
161161
build_file = "@proxy_wasm_cpp_host//bazel/external:wamr.BUILD",
162-
# WAMR-2022-12-16
163-
sha256 = "976b928f420040a77e793051e4d742208adf157370b9ad0f5535e126adb31eb0",
164-
strip_prefix = "wasm-micro-runtime-WAMR-1.1.2",
165-
url = "https://github.com/bytecodealliance/wasm-micro-runtime/archive/WAMR-1.1.2.tar.gz",
162+
# WAMR-1.2.1
163+
sha256 = "7548d4bbea8dbb9b005e83bd571f93a12fb3f0b5e87a8b0130f004dd92df4b0b",
164+
strip_prefix = "wasm-micro-runtime-WAMR-1.2.1",
165+
url = "https://github.com/bytecodealliance/wasm-micro-runtime/archive/refs/tags/WAMR-1.2.1.zip",
166166
)
167167

168168
native.bind(
@@ -172,11 +172,11 @@ def proxy_wasm_cpp_host_repositories():
172172

173173
maybe(
174174
http_archive,
175-
name = "llvm-13_0_1",
175+
name = "llvm-prj-15_0_7",
176176
build_file = "@proxy_wasm_cpp_host//bazel/external:wamr_llvm.BUILD",
177-
sha256 = "ec6b80d82c384acad2dc192903a6cf2cdbaffb889b84bfb98da9d71e630fc834",
178-
strip_prefix = "llvm-13.0.1.src",
179-
url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.1/llvm-13.0.1.src.tar.xz",
177+
sha256 = "8b5fcb24b4128cf04df1b0b9410ce8b1a729cb3c544e6da885d234280dedeac6",
178+
strip_prefix = "llvm-project-15.0.7.src",
179+
url = "https://github.com/llvm/llvm-project/releases/download/llvmorg-15.0.7/llvm-project-15.0.7.src.tar.xz",
180180
)
181181

182182
# WasmEdge with dependencies.

src/wamr/wamr.cc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,11 @@ bool Wamr::link(std::string_view /*debug_name*/) {
261261
const wasm_name_t *name_ptr = wasm_importtype_name(import_types.get()->data[i]);
262262
const wasm_externtype_t *extern_type = wasm_importtype_type(import_types.get()->data[i]);
263263

264-
std::string_view module_name(module_name_ptr->data, module_name_ptr->size);
265-
std::string_view name(name_ptr->data, name_ptr->size);
266-
assert(name_ptr->size > 0);
264+
assert(std::strlen(name_ptr->data) > 0);
265+
266+
std::string_view module_name(module_name_ptr->data, std::strlen(module_name_ptr->data));
267+
std::string_view name(name_ptr->data, std::strlen(name_ptr->data));
268+
267269
switch (wasm_externtype_kind(extern_type)) {
268270
case WASM_EXTERN_FUNC: {
269271
auto it = host_functions_.find(std::string(module_name) + "." + std::string(name));
@@ -354,7 +356,7 @@ bool Wamr::link(std::string_view /*debug_name*/) {
354356
case WASM_EXTERN_FUNC: {
355357
WasmFuncPtr func = wasm_func_copy(wasm_extern_as_func(actual_extern));
356358
const wasm_name_t *name_ptr = wasm_exporttype_name(export_types.get()->data[i]);
357-
module_functions_.insert_or_assign(std::string(name_ptr->data, name_ptr->size),
359+
module_functions_.insert_or_assign(std::string(name_ptr->data, std::strlen(name_ptr->data)),
358360
std::move(func));
359361
} break;
360362
case WASM_EXTERN_GLOBAL: {

0 commit comments

Comments
 (0)