fix(llvm<14) (#2310)

* fix(llvm<14)

* fix test too
This commit is contained in:
Jacob Heider 2023-06-28 00:07:35 -04:00 committed by GitHub
parent 88bd4668f5
commit 19952d812e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -22,14 +22,20 @@ build:
cmake.org: 3
ninja-build.org: 1
python.org: 3
crates.io/semverator: '*'
working-directory: build
script: |-
cmake \
../llvm \
-G Ninja \
$ARGS
ninja
ninja install
script:
# Building compiler-rt on darwin+aarch64 fails for versions less than
# 14 with the below configuration. FIXME if possible, of course.
- run: |
if test "{{hw.platform}}" = "linux" || \
test "{{hw.arch}}" = "x86-64" || \
semverator satisies '>=14'; then
ARGS="$ARGS -DLLVM_ENABLE_RUNTIMES='compiler-rt'"
fi
- cmake ../llvm -G Ninja $ARGS
- ninja
- ninja install
receipt:
- LLVMConfig.cmake
env:
@ -37,7 +43,6 @@ build:
- -DCMAKE_INSTALL_PREFIX="{{ prefix }}"
- -DCMAKE_BUILD_TYPE=Release
- -DLLVM_ENABLE_PROJECTS='lld;clang'
- -DLLVM_ENABLE_RUNTIMES='compiler-rt'
- -DLLVM_INCLUDE_DOCS=OFF
- -DLLVM_INCLUDE_TESTS=OFF
linux:
@ -79,11 +84,20 @@ test:
printf("Hello World!\n");
return 0;
}
dependencies:
crates.io/semverator: '*'
script:
# Building compiler-rt on darwin+aarch64 fails for versions less than
# 14 with the below configuration. FIXME if possible, of course.
- run: |
if test "{{hw.platform}}" = "linux" || \
test "{{hw.arch}}" = "x86-64" || \
semverator satisies '>=14'; then
ARGS="$ARGS -fsanitize=address,undefined"
fi
- mv $FIXTURE $FIXTURE.c
- clang $ARGS $FIXTURE.c
- ./a.out
env:
ARGS:
- -fsanitize=address,undefined
- -Wl,-rpath,$TEA_PREFIX