9 Commits

Author SHA1 Message Date
Stephan Renatus 7c48e417ea wasm: updates (LLVM+tools) (#8295)
* wasm: update wabt and binaryen in builder image
* wasm: bump ubuntu and llvm
* wasm: bump LLVM 13 -> 21, adjust headers
* wasm: make docker optional

We depend on it in our builds, but if you happen to bring

clang (LLVM 21)
clang++ (LLVM 21)
wasm-ld (LLVM 21)
wasm2wat (wabt)
wasm-opt (binaryen)
node

you should be able to build the opa.wasm blob without the docker image.


Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2026-02-05 15:31:23 +01:00
StepSecurity Bot 8d2b2a85ab [StepSecurity] Apply security best practices (#6853)
Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
2024-07-04 20:42:17 +02:00
Stephan Renatus 09a8756ebf wasm/builder: bump llvm, wabt, binaryen (#3908)
LLVM 13, latest wabt and binaryen.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2021-10-26 07:36:13 +02:00
Stephan Renatus 657d43b6a7 wasm-builder: bump llvm (12.0.1), add clang-format (#3673)
The only changes in our wasm modules are the producers section:

    147664,147666c147664,147666
    <   ;;  "\01\0cprocessed-by\01\0cUbuntu clang=12."
    <   ;;  "0.1-++20210504084337+e294ece42d8"
    <   ;;  "5-1~exp1~20210504185042.83")
    ---
    >   ;;  "\01\0cprocessed-by\01\0cUbuntu clang>12."
    >   ;;  "0.1-++20210630032618+fed41342a82"
    >   ;;  "f-1~exp1~20210630133332.127")

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2021-07-29 13:16:20 +02:00
Stephan Renatus 1133221d97 wasm: use llvm-12 toolchain (#3432)
Without the added _LIBCPP_HAS_NO_LIBRARY_ALIGNED_ALLOCATION, the
build would fail looking for posix_memalign. Having added that,
the build failed because it's missing the symbol std::align_val_t.
It looks like everything is fine without those methods, so they
have been removed.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2021-05-06 15:32:26 +02:00
Stephan Renatus 07ad5b0579 opa-wasm-builder: bump wabt, add binaryen (#3111)
Some smaller changes to the wasm-builder docker image:

- wabt: bump to latest release
- binaryen: add

Uses update-alternatives to select LLVM 11: Set up like this, we can
build binaryen without the trouble I had run into otherwise.

Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
2021-02-02 20:28:37 +01:00
Teemu Koponen d765a55f16 wasm: Upgrade to clang 11.
Prepares the builder for compiling C++.

Signed-off-by: Teemu Koponen <koponen@styra.com>
2020-10-28 17:20:13 -04:00
Patrick East 94d99d0e9f wasm: Update to llvm 10 build tools
As part of this update we needed to change the memory grow builtins.
The version we used were removed in https://reviews.llvm.org/D56645
after (apparently) having been deprecated for some time. The newer
versions match up with more recent versions of the WASM spec (see
https://github.com/WebAssembly/spec/issues/627 for more context).

The WebAssembly/wabt version is also updated to the latest release to
correct build issues with the older one and llvm 10.

Upgrading should prevent a deadlock we saw periodically in the CI
while building the OPA wasm binaries.

Signed-off-by: Patrick East <east.patrick@gmail.com>
2020-07-10 11:00:25 -07:00
Torin Sandall 90bda056b4 Add C library implementing operations for WASM
These changes add a C library that implements low-level data operations
and JSON parsing for WASM policies. The output of the WASM build process
are checked into the repository so that OPA can easily access the
bytecode for test and other purposes.

Signed-off-by: Torin Sandall <torinsandall@gmail.com>
2018-10-08 17:29:18 -07:00