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