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

bump WAMR version #2

Open
wants to merge 1 commit into
base: dev-1.27.2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
155 changes: 147 additions & 8 deletions bazel/foreign_cc/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,129 @@ envoy_cmake(
alwayslink = True,
)

envoy_cmake(
name = "llvm_15_0_7",
cache_entries = {
# Disable both: BUILD and INCLUDE, since some of the INCLUDE
# targets build code instead of only generating build files.
"LLVM_BUILD_BENCHMARKS": "off",
"LLVM_BUILD_DOCS": "off",
"LLVM_BUILD_EXAMPLES": "off",
"LLVM_BUILD_TESTS": "off",
"LLVM_BUILD_TOOLS": "off",
"LLVM_ENABLE_IDE": "off",
"LLVM_ENABLE_LIBEDIT": "off",
"LLVM_ENABLE_LIBXML2": "off",
"LLVM_ENABLE_TERMINFO": "off",
"LLVM_ENABLE_ZLIB": "off",
"LLVM_ENABLE_ZSTD": "off",
"LLVM_INCLUDE_BENCHMARKS": "off",
"LLVM_INCLUDE_DOCS": "off",
"LLVM_INCLUDE_EXAMPLES": "off",
"LLVM_INCLUDE_TESTS": "off",
"LLVM_INCLUDE_TOOLS": "off",
"LLVM_TARGETS_TO_BUILD": "X86",
"LLVM_USE_PERF": "on",
"CMAKE_CXX_FLAGS": "-Wno-unused-command-line-argument",
},
generate_args = ["-GNinja"] + select({
# `lld` doesn't work on MacOS
"@platforms//os:linux": ["-DLLVM_USE_LINKER=lld"],
"//conditions:default": [],
}) + select({
"//bazel:dbg_build": ["-DCMAKE_BUILD_TYPE=Debug"],
"//conditions:default": ["-DCMAKE_BUILD_TYPE=MinSizeRel"],
}),
lib_source = "@org_llvm_llvm_15_0_7//:all",
out_data_dirs = [
"bin",
"include",
"lib",
"libexec",
"share",
],
out_static_libs = [
# How to get the library list:
# build LLVM with "-DLLVM_INCLUDE_TOOLS=ON"
# cd bin and run "./llvm-config --libnames"
"libLLVMWindowsManifest.a",
"libLLVMXRay.a",
"libLLVMLibDriver.a",
"libLLVMDlltoolDriver.a",
"libLLVMCoverage.a",
"libLLVMLineEditor.a",
"libLLVMX86Disassembler.a",
"libLLVMX86AsmParser.a",
"libLLVMX86CodeGen.a",
"libLLVMX86Desc.a",
"libLLVMX86Info.a",
"libLLVMOrcJIT.a",
"libLLVMMCJIT.a",
"libLLVMJITLink.a",
"libLLVMInterpreter.a",
"libLLVMExecutionEngine.a",
"libLLVMRuntimeDyld.a",
"libLLVMOrcTargetProcess.a",
"libLLVMOrcShared.a",
"libLLVMDWP.a",
"libLLVMSymbolize.a",
"libLLVMDebugInfoPDB.a",
"libLLVMDebugInfoGSYM.a",
"libLLVMOption.a",
"libLLVMObjectYAML.a",
"libLLVMMCA.a",
"libLLVMMCDisassembler.a",
"libLLVMLTO.a",
"libLLVMPasses.a",
"libLLVMCFGuard.a",
"libLLVMCoroutines.a",
"libLLVMObjCARCOpts.a",
"libLLVMipo.a",
"libLLVMVectorize.a",
"libLLVMLinker.a",
"libLLVMInstrumentation.a",
"libLLVMFrontendOpenMP.a",
"libLLVMFrontendOpenACC.a",
"libLLVMExtensions.a",
"libLLVMDWARFLinker.a",
"libLLVMGlobalISel.a",
"libLLVMMIRParser.a",
"libLLVMAsmPrinter.a",
"libLLVMDebugInfoMSF.a",
"libLLVMDebugInfoDWARF.a",
"libLLVMSelectionDAG.a",
"libLLVMCodeGen.a",
"libLLVMIRReader.a",
"libLLVMAsmParser.a",
"libLLVMInterfaceStub.a",
"libLLVMFileCheck.a",
"libLLVMFuzzMutate.a",
"libLLVMTarget.a",
"libLLVMScalarOpts.a",
"libLLVMInstCombine.a",
"libLLVMAggressiveInstCombine.a",
"libLLVMTransformUtils.a",
"libLLVMBitWriter.a",
"libLLVMAnalysis.a",
"libLLVMProfileData.a",
"libLLVMObject.a",
"libLLVMTextAPI.a",
"libLLVMMCParser.a",
"libLLVMMC.a",
"libLLVMDebugInfoCodeView.a",
"libLLVMBitReader.a",
"libLLVMCore.a",
"libLLVMRemarks.a",
"libLLVMBitstreamReader.a",
"libLLVMBinaryFormat.a",
"libLLVMTableGen.a",
"libLLVMSupport.a",
"libLLVMDemangle.a",
"libLLVMPerfJITEvents.a",
],
working_directory = "llvm",
)

envoy_cmake(
name = "nghttp2",
cache_entries = {
Expand All @@ -468,21 +591,37 @@ envoy_cmake(
envoy_cmake(
name = "wamr",
cache_entries = {
"WAMR_BUILD_AOT": "0",
"WAMR_BUILD_FAST_INTERP": "1",
"WAMR_BUILD_INTERP": "1",
"WAMR_BUILD_JIT": "0",
"LLVM_DIR": "$EXT_BUILD_DEPS/copy_llvm_15_0_7/llvm/lib/cmake/llvm",
# AOT by default
"WAMR_BUILD_AOT": "1",
"WAMR_BUILD_FAST_INTERP": "0",
"WAMR_BUILD_INTERP": "0",
"WAMR_BUILD_JIT": "1",
# disable WASI
"WAMR_BUILD_LIBC_WASI": "0",
"WAMR_BUILD_MULTI_MODULE": "0",
"WAMR_BUILD_SIMD": "0",
"WAMR_BUILD_LIBC_BUILTIN": "0",
# MVP
"WAMR_BUILD_BULK_MEMORY": "1",
"WAMR_BUILD_REF_TYPES": "1",
"WAMR_BUILD_SIMD": "1",
"WAMR_BUILD_TAIL_CALL": "1",
# thread mgr
"WAMR_BUILD_THREAD_MGR": "0",
# name section
"WAMR_BUILD_CUSTOM_NAME_SECTION": "1",
"WAMR_BUILD_LOAD_CUSTOM_SECTION": "1",
# trap information
"WAMR_BUILD_DUMP_CALL_STACK": "1",
# support linux perf
"WAMR_BUILD_LINUX_PERF": "1",
# others
"WAMR_BUILD_MULTI_MODULE": "0",
"WAMR_BUILD_WASM_CACHE": "0",
"WAMR_DISABLE_HW_BOUND_CHECK": "0",
"WAMR_DISABLE_STACK_HW_BOUND_CHECK": "1",
},
lib_source = "@com_github_wamr//:all",
out_static_libs = ["libvmlib.a"],
tags = ["skip_on_windows"],
deps = [":llvm_15_0_7"],
)

envoy_cmake(
Expand Down
11 changes: 11 additions & 0 deletions bazel/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ def envoy_dependencies(skip_targets = []):
_kafka_deps()

_org_llvm_llvm()
_org_llvm_llvm_15_0_7()
_com_github_wamr()
_com_github_wavm_wavm()
_com_github_wasmtime()
Expand Down Expand Up @@ -1243,6 +1244,16 @@ def _org_llvm_llvm():
actual = "@envoy//bazel/foreign_cc:llvm",
)

def _org_llvm_llvm_15_0_7():
external_http_archive(
name = "org_llvm_llvm_15_0_7",
build_file_content = BUILD_ALL_CONTENT,
)
native.bind(
name = "llvm-15_0_7",
actual = "@envoy//bazel/foreign_cc:llvm",
)

def _com_github_wamr():
external_http_archive(
name = "com_github_wamr",
Expand Down
30 changes: 23 additions & 7 deletions bazel/repository_locations.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -988,22 +988,38 @@ REPOSITORY_LOCATIONS_SPEC = dict(
release_date = "2021-07-09",
use_category = ["dataplane_ext"],
extensions = [
"envoy.wasm.runtime.wamr",
"envoy.wasm.runtime.wavm",
],
cpe = "cpe:2.3:a:llvm:*:*",
license = "Apache-2.0",
license_url = "https://github.com/llvm/llvm-project/blob/llvmorg-{version}/llvm/LICENSE.TXT",
),
org_llvm_llvm_15_0_7 = dict(
project_name = "LLVM",
project_desc = "LLVM Compiler Infrastructure",
project_url = "https://llvm.org",
version = "15.0.7",
sha256 = "8b5fcb24b4128cf04df1b0b9410ce8b1a729cb3c544e6da885d234280dedeac6",
strip_prefix = "llvm-project-{version}.src",
urls = ["https://github.com/llvm/llvm-project/releases/download/llvmorg-{version}/llvm-project-{version}.src.tar.xz"],
release_date = "2023-01-12",
use_category = ["dataplane_ext"],
extensions = [
"envoy.wasm.runtime.wamr",
],
cpe = "cpe:2.3:a:llvm:*:*",
license = "Apache-2.0",
license_url = "https://github.com/llvm/llvm-project/blob/llvmorg-{version}/llvm/LICENSE.TXT",
),
com_github_wamr = dict(
project_name = "Webassembly Micro Runtime",
project_desc = "A standalone runtime with a small footprint for WebAssembly",
project_url = "https://github.com/bytecodealliance/wasm-micro-runtime",
version = "WAMR-1.2.2",
sha256 = "d328fc1e19c54cfdb4248b861de54b62977b9b85c0a40eaaeb9cd9b628c0c788",
version = "5e2011ca1d03d2499b00e423f2eeccf221a2370c",
sha256 = "b1536dd8e86571dc28268e8ef55cae21a7ec49881c675ad5a514dc14c78afcb8",
strip_prefix = "wasm-micro-runtime-{version}",
urls = ["https://github.com/bytecodealliance/wasm-micro-runtime/archive/{version}.tar.gz"],
release_date = "2023-05-16",
release_date = "2024-03-14",
use_category = ["dataplane_ext"],
extensions = ["envoy.wasm.runtime.wamr"],
cpe = "N/A",
Expand Down Expand Up @@ -1340,10 +1356,10 @@ REPOSITORY_LOCATIONS_SPEC = dict(
project_name = "WebAssembly for Proxies (C++ host implementation)",
project_desc = "WebAssembly for Proxies (C++ host implementation)",
project_url = "https://github.com/proxy-wasm/proxy-wasm-cpp-host",
version = "5d76116c449d6892b298b7ae79a84ef1cf5752bf",
sha256 = "a5825a1a5bbd5b0178c6189b227d5cf4370ac713a883b41f6a54edd768a03cb7",
version = "3ed8a53ff4e251805a13f72db3cb8e524a78d765",
sha256 = "d2519847a985f3e38a10032ef8428adea225940da45b1f6bcf9b92e433df03ef",
strip_prefix = "proxy-wasm-cpp-host-{version}",
urls = ["https://github.com/proxy-wasm/proxy-wasm-cpp-host/archive/{version}.tar.gz"],
urls = ["https://github.com/lum1n0us/proxy-wasm-cpp-host/archive/{version}.tar.gz"],
use_category = ["dataplane_ext"],
extensions = [
"envoy.access_loggers.wasm",
Expand Down
Loading