- // Actually execute the program!
- int RetVal = AI->ExecuteProgram(BytecodeFile, InputArgv, InputFile,
- OutputFile, SharedObjs, TimeoutValue);
+
+ // If this is an LLC or CBE run, then the GCC compiler might get run to
+ // compile the program. If so, we should pass the user's -Xlinker options
+ // as the GCCArgs.
+ int RetVal = 0;
+ if (InterpreterSel == RunLLC || InterpreterSel == RunCBE)
+ RetVal = AI->ExecuteProgram(BytecodeFile, InputArgv, InputFile,
+ OutputFile, AdditionalLinkerArgs, SharedObjs,
+ Timeout);
+ else
+ RetVal = AI->ExecuteProgram(BytecodeFile, InputArgv, InputFile,
+ OutputFile, std::vector<std::string>(),
+ SharedObjs, Timeout);