nelhage / llama

Apache License 2.0
584 stars 24 forks source link

Use detected local compiler on fallback. #43

Closed jpeach closed 3 years ago

jpeach commented 3 years ago

If we fall back to local compilation, attempt to use the compiler for the detected language. This fixes fallback for local compilations that use "cc" with the "-x c++" flag.

nelhage commented 3 years ago

Hm. I'm not opposed, but that's the circumstance where we were called as $CC -x c++, but cc -x c++ isn't sufficient to work as a fallback?

jpeach commented 3 years ago

Yeh I did originally think this was needed when the input type wasn't detected, but as you point out this change doesn't help that by definition.

At this point, I'm happy to either merge in the name of consistency, or drop the change.

nelhage commented 3 years ago

Yeah, I think the most consistent thing -- until we have a test case otherwise -- is to invoke cc if we were invoked as $CC, and vice versa.