fix: modification des scripts pour gérer les versions de clang

This commit is contained in:
Dimitri Lajou
2025-03-26 14:32:02 +01:00
parent 02dc941c22
commit 989d95c38c
2 changed files with 34 additions and 2 deletions

23
compile
View File

@@ -13,4 +13,25 @@ name="`dirname $1`/`basename $1 .vsl`"
# translating from VSL to LLVM IR (.ll)
java -jar build/libs/TP2.jar < $name.vsl > $name.ll
clang $name.ll -o $name
# Check clang version
if command -v clang-20 2>&1 >/dev/null
then
cl=clang-20
else
if command -v clang-19 2>&1 >/dev/null
then
cl=clang-19
else
if command -v clang-18 2>&1 >/dev/null
then
cl=clang-18
else
if command -v clang-17 2>&1 >/dev/null
then
cl=clang-17
else
cl=clang
fi fi fi fi
# Compile using clang
$cl $name.ll -o $name