Allow a user of libLTO to specify the full pathname of the gcc executable to
run when assembling.

Wire this up to the gold plugin. You can now pass --plugin-opt gcc=/foo/bar/gcc
and it will run that gcc instead of looking for it on the path.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70490 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/tools/lto/lto.cpp b/tools/lto/lto.cpp
index 227823f..5c3f90a 100644
--- a/tools/lto/lto.cpp
+++ b/tools/lto/lto.cpp
@@ -202,6 +202,14 @@
 }
 
 //
+// sets the path to gcc
+//
+void lto_codegen_set_gcc_path(lto_code_gen_t cg, const char* path)
+{
+    cg->setGccPath(path);
+}
+
+//
 // adds to a list of all global symbols that must exist in the final
 // generated code.  If a function is not listed there, it might be
 // inlined into every usage and optimized away.