[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#77653] [PATCH 2/4] gnu: Add wasm32-wasi-clang-runtime.
From: |
Z572 |
Subject: |
[bug#77653] [PATCH 2/4] gnu: Add wasm32-wasi-clang-runtime. |
Date: |
Wed, 09 Apr 2025 10:58:05 +0800 |
User-agent: |
mu4e 1.12.9; emacs 30.0.92 |
Ian Eure <ian@retrospec.tv> writes:
> * gnu/packages/wasm.scm (wasm32-wasi-clang-runtime): New variable.
>
> Change-Id: Ib0465fdc86086451782d533380a8966cdde6dc1e
> ---
> gnu/packages/wasm.scm | 30 ++++++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/gnu/packages/wasm.scm b/gnu/packages/wasm.scm
> index 060e1e420f..53ea31f4a7 100644
> --- a/gnu/packages/wasm.scm
> +++ b/gnu/packages/wasm.scm
> @@ -76,3 +76,33 @@ (define-public wasi-libc
> license:bsd-2
> ;; For wasi-libc and musl-libc.
> license:expat))))
> +
> +(define-public wasm32-wasi-clang-runtime
> + (package (inherit clang-runtime-16)
Please add a line break
(package
(inherit clang-runtime-16)
....
)
> + (native-inputs
> + (list clang-16
> + wasi-libc))
Should wasi-libc be placed in inputs?
> + (inputs (list llvm-16))
> + (arguments
> + (list
> + #:build-type "Release"
> + #:tests? #f
> + ;; Stripping binaries breaks wasm linking, resulting in the following
> + ;; error: "archive has no index; run ranlib to add one".
> + #:strip-binaries? #f
> + #:configure-flags
> + #~(list "-DCMAKE_C_COMPILER=clang"
> + "-DCMAKE_C_COMPILER_TARGET=wasm32-wasi"
> + (string-append
> + "-DCMAKE_SYSROOT=" #$wasi-libc "/wasm32-wasi")
(this-package-native-input "wasi-libc")
> + (string-append
> + "-DCMAKE_C_FLAGS=-I " #$wasi-libc "/wasm32-wasi/include")
(this-package-native-input "wasi-libc")
> +
> + "-DCOMPILER_RT_OS_DIR=wasi"
> +
> + "-DCOMPILER_RT_BAREMETAL_BUILD=On"
> + "-DCOMPILER_RT_DEFAULT_TARGET_ONLY=On"
> +
> + ;; WASM only needs libclang_rt.builtins-wasm32.a from
> + ;; compiler-rt.
> + "../source/compiler-rt/lib/builtins")))))
signature.asc
Description: PGP signature
- [bug#77653] [PATCH 0/4] Add WASM toolchain, wasi-libc, and browser WASM sandbox support, Ian Eure, 2025/04/08
- [bug#77653] [PATCH 1/4] gnu: Add wasi-libc., Ian Eure, 2025/04/08
- [bug#77653] [PATCH 3/4] gnu: Add wasm32-wasi-clang., Ian Eure, 2025/04/08
- [bug#77653] [PATCH 4/4] gnu: Add wasm-sandboxed., Ian Eure, 2025/04/08
- [bug#77653] [PATCH 2/4] gnu: Add wasm32-wasi-clang-runtime., Ian Eure, 2025/04/08
- [bug#77653] [PATCH 1/4] gnu: Add wasi-libc., Z572, 2025/04/08
- [bug#77653] [PATCH 1/4] gnu: Add wasi-libc., Maxim Cournoyer, 2025/04/25
- [bug#77653] [PATCH 2/4] gnu: Add wasm32-wasi-clang-runtime., Ian Eure, 2025/04/09
- [bug#77653] [PATCH 0/4] Add WASM toolchain, wasi-libc, and browser WASM sandbox support, Maxim Cournoyer, 2025/04/25
- [bug#77653] [PATCH 0/4] Add WASM toolchain, wasi-libc, and browser WASM sandbox support, Ian Eure, 2025/04/27