fix(llvm^12)

This commit is contained in:
Jacob Heider 2023-10-10 21:39:17 -04:00
parent 71ceb9b4e1
commit 68778be96b
No known key found for this signature in database
GPG key ID: 51E3FD0EE62677B6

View file

@ -36,12 +36,14 @@ build:
# Building compiler-rt on darwin+aarch64 fails for versions less than # Building compiler-rt on darwin+aarch64 fails for versions less than
# 14 with the below configuration. FIXME if possible, of course. # 14 with the below configuration. FIXME if possible, of course.
- run: | - run: |
if test "{{hw.platform}}" = "linux" || \ if test "{{hw.platform}}" = "linux"; then
test "{{hw.arch}}" = "x86-64" || \ ARGS="$ARGS -DLLVM_ENABLE_RUNTIMES='compiler-rt'"
semverator satisfies '>=14' {{version}}; then elif semverator satisfies '>=14' {{version}}; then
ARGS="$ARGS -DLLVM_ENABLE_RUNTIMES='compiler-rt'"
elif test "{{hw.arch}}" = "x86-64" && semverator satisfies '>=14' {{version}}; then
ARGS="$ARGS -DLLVM_ENABLE_RUNTIMES='compiler-rt'" ARGS="$ARGS -DLLVM_ENABLE_RUNTIMES='compiler-rt'"
fi fi
# if: linux || x86-64 || >=14 ## Brewkit can't do this. Yet. # if: linux || >=14 || (x86-64 && >=13) ## Brewkit can't do this. Yet.
- cmake ../llvm -G Ninja $ARGS - cmake ../llvm -G Ninja $ARGS
- ninja - ninja
- ninja install - ninja install
@ -113,12 +115,14 @@ test:
# Building compiler-rt on darwin+aarch64 fails for versions less than # Building compiler-rt on darwin+aarch64 fails for versions less than
# 14 with the below configuration. FIXME if possible, of course. # 14 with the below configuration. FIXME if possible, of course.
- run: | - run: |
if test "{{hw.platform}}" = "linux" || \ if test "{{hw.platform}}" = "linux"; then
test "{{hw.arch}}" = "x86-64" || \ ARGS="$ARGS -fsanitize=address,undefined"
semverator satisfies '>=14' {{version}}; then elif semverator satisfies '>=14' {{version}}; then
ARGS="$ARGS -fsanitize=address,undefined"
elif test "{{hw.arch}}" = "x86-64" && semverator satisfies '>=14' {{version}}; then
ARGS="$ARGS -fsanitize=address,undefined" ARGS="$ARGS -fsanitize=address,undefined"
fi fi
# if: linux || x86-64 || >=14 ## Brewkit can't do this. Yet. # if: linux || >=14 || (x86-64 && >=13) ## Brewkit can't do this. Yet.
- mv $FIXTURE $FIXTURE.c - mv $FIXTURE $FIXTURE.c
- clang $ARGS $FIXTURE.c - clang $ARGS $FIXTURE.c
- ./a.out - ./a.out