Closed ilovezfs closed 8 years ago
Also, this looks like a bug to me:
elseif string.match(os.getenv("CC"), "^clang") then
print("CL!")
SetDriversDefault = SetDriversCL
I assume this should be looking for cl, not clang, since you've already checked for clang higher up.
For what it's worth, this patch seems to work (see https://github.com/Homebrew/homebrew-core/pull/2074):
diff --git a/src/tools.lua b/src/tools.lua
index f3b9b10..995d58e 100644
--- a/src/tools.lua
+++ b/src/tools.lua
@@ -5,13 +5,13 @@ function SetDefaultDrivers(settings)
if _checked_default_drivers == false then
_checked_default_drivers = true
if os.getenv("CC") then
- if string.match(os.getenv("CC"), "^clang") then
+ if string.match(os.getenv("CC"), "/clang") then
print("CLANG!")
SetDriversDefault = SetDriversClang
- elseif string.match(os.getenv("CC"), "^gcc") then
+ elseif string.match(os.getenv("CC"), "/gcc") then
print("GCC!")
SetDriversDefault = SetDriversGCC
- elseif string.match(os.getenv("CC"), "^clang") then
+ elseif string.match(os.getenv("CC"), "/cl") then
print("CL!")
SetDriversDefault = SetDriversCL
end
Fixed with 27b28f0956a78844e73aa94fee7d0187c9b68bbd. Also, going to try to release more regular updates for now on and document whats happening between them.
@matricks cool thank you.
The new environment variable detection in https://github.com/matricks/bam/commit/2e65531e340957f141173f7378bdbba617fe7a1e doesn't support absolute paths to the compilers. If you do use an absolute path, you end up with this error: