fix: modification des scripts pour gérer les versions de clang
This commit is contained in:
@@ -9,6 +9,17 @@ from colorama import Style
|
||||
|
||||
stats = {}
|
||||
|
||||
# Détermine quel est l'exécutable clang utilisable.
|
||||
# Note : à l'istic c'est clang-19
|
||||
def clangName():
|
||||
for name in ["clang-" + str(v) for v in range(20,16,-1)]:
|
||||
p = subprocess.run(f"command -v {name} 2>&1 >/dev/null", shell=True)
|
||||
if p.returncode == 0 :
|
||||
return name
|
||||
return "clang"
|
||||
|
||||
clang = clangName()
|
||||
|
||||
def runTestNormalLevel(level):
|
||||
print(f"Running test of level {level}")
|
||||
stats[level] = (0,0,0,0)
|
||||
@@ -37,7 +48,7 @@ def runNormalTest(i, dirname,filename):
|
||||
|
||||
# LLVM -> Bin
|
||||
if vslToLLVM :
|
||||
p = subprocess.run(f"clang {basename}.ll -o {basename} 2>/dev/null", shell=True)
|
||||
p = subprocess.run(f"{clang} {basename}.ll -o {basename} 2>/dev/null", shell=True)
|
||||
if p.returncode == 0:
|
||||
llvmToBin = True
|
||||
executionCorrect = True
|
||||
|
||||
Reference in New Issue
Block a user