mirror of
https://github.com/ivabus/pantry
synced 2024-11-14 12:35:10 +03:00
614c7b6ee2
needs system prefix to use libc++
61 lines
1.5 KiB
YAML
61 lines
1.5 KiB
YAML
distributable:
|
|
url: https://github.com/llvm/llvm-project/releases/download/llvmorg-{{ version }}/llvm-project-{{ version }}.src.tar.xz
|
|
strip-components: 1
|
|
|
|
versions:
|
|
github: llvm/llvm-project
|
|
strip: /^llvmorg-/
|
|
|
|
build:
|
|
dependencies:
|
|
cmake.org: '>=3<3.29'
|
|
ninja-build.org: 1
|
|
python.org: '>=3<3.12'
|
|
llvm.org: '*'
|
|
working-directory: build
|
|
script:
|
|
- cmake ../runtimes -G Ninja $ARGS
|
|
- ninja cxx cxxabi unwind
|
|
- ninja install-cxx install-cxxabi install-unwind
|
|
|
|
# move linux libs into /lib
|
|
- run: |
|
|
TARGET="$(find . -maxdepth 1 -type d -name \*-unknown-linux-gnu)"
|
|
if test -n "$TARGET"; then
|
|
mv "$TARGET"/* .
|
|
rmdir "$TARGET"
|
|
ln -s . "$TARGET"
|
|
fi
|
|
working-directory: ${{prefix}}/lib
|
|
if: linux
|
|
env:
|
|
ARGS:
|
|
- -DCMAKE_INSTALL_PREFIX="{{ prefix }}"
|
|
- -DCMAKE_BUILD_TYPE=Release
|
|
- -DLLVM_INCLUDE_DOCS=OFF
|
|
- -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind"
|
|
- -DLLVM_INCLUDE_TESTS=OFF
|
|
- -DLLVM_ENABLE_RTTI=ON
|
|
|
|
test:
|
|
dependencies:
|
|
llvm.org: '*'
|
|
script:
|
|
- run: clang++ $ARGS $FIXTURE
|
|
fixture:
|
|
extname: cpp
|
|
content: |
|
|
#include <iostream>
|
|
|
|
int main() {
|
|
std::cout << "Hello, World!" << std::endl;
|
|
return 0;
|
|
}
|
|
- ./a.out
|
|
env:
|
|
ARGS:
|
|
- -Wl,-rpath,$PKGX_DIR
|
|
- -std=c++11
|
|
- -stdlib=libc++
|
|
- -lc++
|
|
- -isystem {{prefix}}/include/c++/v1
|