mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-20 09:24:58 +00:00
Dan is right, using "string first" would produce false positives. So,
devolve the check to a comparison against each component in the string. Fortunately there isn't many of them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36376 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
703f5291c4
commit
4f6e9ab3d7
@ -207,14 +207,16 @@ proc llvm_gcc_supports { lang } {
|
|||||||
fortran { set file fcc1 }
|
fortran { set file fcc1 }
|
||||||
default { return 0 }
|
default { return 0 }
|
||||||
}
|
}
|
||||||
if { [ string first "$lang" "$llvmgcc_langs" ] >= 0 } {
|
foreach supported_lang [split "$llvmgcc_langs" ,] {
|
||||||
|
if { "$lang" == "$supported_lang" } {
|
||||||
# FIXME: Knowing it is configured is not enough. We should do two more
|
# FIXME: Knowing it is configured is not enough. We should do two more
|
||||||
# checks here. First, we need to run llvm-gcc -print-prog-name=$file to get
|
# checks here. First, we need to run llvm-gcc -print-prog-name=$file to
|
||||||
# the path to the compiler. If we don't get a path, the language isn't
|
# get the path to the compiler. If we don't get a path, the language isn't
|
||||||
# properly configured or built. If we do get a path, we should check to make
|
# properly configured or built. If we do get a path, we should check to
|
||||||
# sure that it is executable and perhaps even try executing it.
|
# make sure that it is executable and perhaps even try executing it.
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user