fix: modification des scripts pour gérer les versions de clang
This commit is contained in:
23
compile
23
compile
@@ -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
|
||||
Reference in New Issue
Block a user