fix(llvm)

closes #5796
This commit is contained in:
Jacob Heider 2024-04-04 11:43:41 -04:00 committed by Jacob Heider
parent 5c892d626c
commit 0cfb1f3c73

View file

@ -64,9 +64,11 @@ build:
# move linux libs into /lib # move linux libs into /lib
- run: | - run: |
TARGET="$(find . -maxdepth 1 -type d -name \*-unknown-linux-gnu)" TARGET="$(find . -maxdepth 1 -type d -name \*-unknown-linux-gnu)"
mv "$TARGET"/* . if test -n "$TARGET"; then
rmdir "$TARGET" mv "$TARGET"/* .
ln -s . "$TARGET" rmdir "$TARGET"
ln -s . "$TARGET"
fi
working-directory: ${{prefix}}/lib working-directory: ${{prefix}}/lib
if: linux if: linux
@ -124,16 +126,29 @@ test:
crates.io/semverator: '*' crates.io/semverator: '*'
script: script:
# 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, and on darwin generally for 18.1.3.
# FIXME if possible, of course.
- run: LINUX=1
if: linux
- run: AARCH64=1
if: aarch64
- run: GT13=1
if: '>=13'
- run: GT14=1
if: '>=14'
- run: EQ1813=1
if: '=18.1.3'
# cases
# "1,*,*,*," => linux != 18.1.3
# ",,1,*," => darwin+x86-64 >=13 != 18.1.3
# ",1,1,1," => darwin+aarch64 >=14 != 18.1.3
- run: | - run: |
if test "{{hw.platform}}" = "linux"; then case "$LINUX,$AARCH64,$GT13,$GT14,$EQ1813" in
ARGS="$ARGS -fsanitize=address,undefined" "1,*,*,*,"|",,1,*,"|",1,1,1,") ARGS="$ARGS -fsanitize=address,undefined";;
elif semverator satisfies '>=14' {{version}}; then *) ;;
ARGS="$ARGS -fsanitize=address,undefined" esac
elif test "{{hw.arch}}" = "x86-64" && semverator satisfies '>=14' {{version}}; then # if: linux || >=14<18.1.3 || (x86-64 && >=13<18.1.3) ## Brewkit can't do this. Yet.
ARGS="$ARGS -fsanitize=address,undefined"
fi
# 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