mirror of
https://github.com/ivabus/pantry
synced 2024-11-23 00:45:07 +03:00
tweak llvm+rust
This commit is contained in:
parent
4f7bce0f85
commit
ba3dbb1122
2 changed files with 15 additions and 19 deletions
|
@ -19,20 +19,6 @@ build:
|
||||||
python.org: 3
|
python.org: 3
|
||||||
working-directory: build
|
working-directory: build
|
||||||
script: |-
|
script: |-
|
||||||
if test {{ hw.target }} = x86_64-unknown-linux-gnu; then
|
|
||||||
# required to build something that works on linux/x86-64
|
|
||||||
ARGS="$ARGS
|
|
||||||
-DCLANG_DEFAULT_CXX_STDLIB=libstdc++
|
|
||||||
-DCLANG_DEFAULT_RTLIB=libgcc
|
|
||||||
-DCOMPILER_RT_INCLUDE_TESTS=OFF
|
|
||||||
-DCOMPILER_RT_USE_LIBCXX=OFF"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# without this macOS programs typically won’t link to core symbols
|
|
||||||
if test {{ hw.platform }} = darwin; then
|
|
||||||
ARGS="$ARGS -DDEFAULT_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk"
|
|
||||||
fi
|
|
||||||
|
|
||||||
cmake \
|
cmake \
|
||||||
../llvm \
|
../llvm \
|
||||||
-G Ninja \
|
-G Ninja \
|
||||||
|
@ -59,9 +45,9 @@ build:
|
||||||
ln -sf clang gcc
|
ln -sf clang gcc
|
||||||
ln -sf clang++ g++
|
ln -sf clang++ g++
|
||||||
|
|
||||||
#TODO the above hacks should be a separate directory that can be added
|
#TODO the above hacks should be a separate directory that can be added
|
||||||
# to the PATH when tea.xyz/gx/cc is used
|
# to the PATH when tea.xyz/gx/cc is used
|
||||||
#NOTE they must be symlinks as clang/llvm behave differently based on their arg0 name
|
#NOTE they must be symlinks as clang/llvm behave differently based on their arg0 name
|
||||||
receipt:
|
receipt:
|
||||||
- LLVMConfig.cmake
|
- LLVMConfig.cmake
|
||||||
env:
|
env:
|
||||||
|
@ -71,9 +57,17 @@ build:
|
||||||
- -DLLVM_ENABLE_PROJECTS='lld;clang'
|
- -DLLVM_ENABLE_PROJECTS='lld;clang'
|
||||||
- -DLLVM_INCLUDE_DOCS=OFF
|
- -DLLVM_INCLUDE_DOCS=OFF
|
||||||
- -DLLVM_INCLUDE_TESTS=OFF
|
- -DLLVM_INCLUDE_TESTS=OFF
|
||||||
# without this deno won’t build on darwin/aarch64
|
# the default is `ld` however clang when handling linking itself
|
||||||
# with it nothing seems to break
|
# internally passes flags that, in fact, expect `lld`
|
||||||
|
#NOTE yes this is an issue even if `ld` is in fact a symlink to `lld`
|
||||||
- -DCLANG_DEFAULT_LINKER=lld
|
- -DCLANG_DEFAULT_LINKER=lld
|
||||||
|
linux/x86-64:
|
||||||
|
ARGS:
|
||||||
|
# required to build something that works on linux/x86-64
|
||||||
|
- -DCLANG_DEFAULT_CXX_STDLIB=libstdc++
|
||||||
|
- -DCLANG_DEFAULT_RTLIB=libgcc
|
||||||
|
- -DCOMPILER_RT_INCLUDE_TESTS=OFF
|
||||||
|
- -DCOMPILER_RT_USE_LIBCXX=OFF"
|
||||||
test:
|
test:
|
||||||
fixture: |
|
fixture: |
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -45,6 +45,7 @@ build:
|
||||||
./configure $ARGS
|
./configure $ARGS
|
||||||
make install
|
make install
|
||||||
mv ./build/{{ hw.target }}/stage0/bin/cargo {{ prefix }}/bin/cargo
|
mv ./build/{{ hw.target }}/stage0/bin/cargo {{ prefix }}/bin/cargo
|
||||||
|
rm -rf {{prefix}}/share/doc
|
||||||
#TODO ^^ build cargo properly
|
#TODO ^^ build cargo properly
|
||||||
env:
|
env:
|
||||||
ARGS:
|
ARGS:
|
||||||
|
@ -52,6 +53,7 @@ build:
|
||||||
- --prefix={{ prefix }}
|
- --prefix={{ prefix }}
|
||||||
- --enable-ninja
|
- --enable-ninja
|
||||||
- --enable-optimize
|
- --enable-optimize
|
||||||
|
- --disable-docs # docs are online
|
||||||
test:
|
test:
|
||||||
script: |
|
script: |
|
||||||
rustc $FIXTURE -o hello
|
rustc $FIXTURE -o hello
|
||||||
|
|
Loading…
Reference in a new issue