Index: tools/bugpoint/ExecutionDriver.cpp =================================================================== --- tools/bugpoint/ExecutionDriver.cpp +++ tools/bugpoint/ExecutionDriver.cpp @@ -253,7 +253,16 @@ if (!SafeInterpreter) { outs() << Message << "\nExiting.\n"; exit(1); } gcc = GCC::create(Message, GCCBinary, &GCCToolArgv); - if (!gcc) { outs() << Message << "\nExiting.\n"; exit(1); } + if (!gcc) { + + // Try to fall-back to clang. + GCCBinary = "clang"; + gcc = GCC::create(Message, GCCBinary, &GCCToolArgv); + if (!gcc) { + outs() << Message << "\nExiting.\n"; + exit(1); + } + } // If there was an error creating the selected interpreter, quit with error. return Interpreter == nullptr; Index: tools/bugpoint/ToolRunner.cpp =================================================================== --- tools/bugpoint/ToolRunner.cpp +++ tools/bugpoint/ToolRunner.cpp @@ -546,8 +546,13 @@ GCC *gcc = GCC::create(Message, GCCBinary, GCCArgs); if (!gcc) { - errs() << Message << "\n"; - exit(1); + + // Try to fall-back to clang. + gcc = GCC::create(Message, "clang", GCCArgs); + if (!gcc) { + errs() << Message << "\n"; + exit(1); + } } Message = "Found llc: " + LLCPath + "\n"; return new LLC(LLCPath, gcc, Args, UseIntegratedAssembler);