diff options
author | davidovski <david@davidovski.xyz> | 2022-05-25 22:50:03 +0100 |
---|---|---|
committer | davidovski <david@davidovski.xyz> | 2022-05-25 22:50:03 +0100 |
commit | 7b0628f037dcbf85cfb381d5e05dea39a2059d33 (patch) | |
tree | 4a534ef861d19cdf5235b504af5be2a5d0becb71 /skip/wasi-compiler-rt | |
parent | 79062a39e9bcb9731adbacd0bd9bcd0b59d19d0a (diff) |
fixed various broken dependencies
Diffstat (limited to 'skip/wasi-compiler-rt')
-rw-r--r-- | skip/wasi-compiler-rt/wasi-compiler-rt.xibuild | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/skip/wasi-compiler-rt/wasi-compiler-rt.xibuild b/skip/wasi-compiler-rt/wasi-compiler-rt.xibuild new file mode 100644 index 0000000..c3959dd --- /dev/null +++ b/skip/wasi-compiler-rt/wasi-compiler-rt.xibuild @@ -0,0 +1,45 @@ +#!/bin/sh + +NAME="wasi-compiler-rt" +DESC="WASI LLVM compiler runtime" + +MAKEDEPS="cmake " +DEPS="musl " + +PKG_VER=13.0.1 +wasi_sdk_ver=14 + +SOURCE="https://github.com/WebAssembly/wasi-sdk/archive/refs/tags/wasi-sdk-$wasi_sdk_ver.tar.gz" +ADDITIONAL="https://github.com/llvm/llvm-project/releases/download/llvmorg-$PKG_VER/compiler-rt-$PKG_VER.src.tar.xz" + +prepare () { + tar xf compiler-rt-$PKG_VER.src.tar.xz + mkdir -p wasi-compiler-rt + mv compiler-rt-$PKG_VER.src wasi-compiler-rt/compiler-rt + mv wasi-sdk.cmake wasi-compiler-rt + mv cmake wasi-compiler-rt + +} + +build () { + cd wasi-compiler-rt + mkdir build + cmake -B build \ + -DCMAKE_BUILD_TYPE=MinSizeRel \ + -DCMAKE_MODULE_PATH=$BUILD_ROOT/wasi-compiler-rt/cmake \ + -DCMAKE_TOOLCHAIN_FILE=$BUILD_ROOT/wasi-compiler-rt/wasi-sdk.cmake \ + -DCMAKE_C_COMPILER_WORKS=ON \ + -DCOMPILER_RT_BAREMETAL_BUILD=ON \ + -DCOMPILER_RT_INCLUDE_TESTS=OFF \ + -DCOMPILER_RT_HAS_FPIC_FLAG=OFF \ + -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \ + -DCOMPILER_RT_OS_DIR=wasi \ + -DWASI_SDK_PREFIX=/usr \ + -DCMAKE_INSTALL_PREFIX=/usr/lib/clang/$PKG_VER/ \ + compiler-rt/lib/builtins + cmake --build build +} + +package () { + DESTDIR="$PKG_DEST" cmake --install build +} |