aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/Driver/Driver.h8
-rw-r--r--lib/Driver/Driver.cpp18
2 files changed, 15 insertions, 11 deletions
diff --git a/include/clang/Driver/Driver.h b/include/clang/Driver/Driver.h
index 1dff8b3b10..28eff4f1d7 100644
--- a/include/clang/Driver/Driver.h
+++ b/include/clang/Driver/Driver.h
@@ -206,16 +206,20 @@ public:
/// BuildActions - Construct the list of actions to perform for the
/// given arguments, which are only done for a single architecture.
///
+ /// \param TC - The default host tool chain.
/// \param Args - The input arguments.
/// \param Actions - The list to store the resulting actions onto.
- void BuildActions(const ArgList &Args, ActionList &Actions) const;
+ void BuildActions(const ToolChain &TC, const ArgList &Args,
+ ActionList &Actions) const;
/// BuildUniversalActions - Construct the list of actions to perform
/// for the given arguments, which may require a universal build.
///
+ /// \param TC - The default host tool chain.
/// \param Args - The input arguments.
/// \param Actions - The list to store the resulting actions onto.
- void BuildUniversalActions(const ArgList &Args, ActionList &Actions) const;
+ void BuildUniversalActions(const ToolChain &TC, const ArgList &Args,
+ ActionList &Actions) const;
/// BuildJobs - Bind actions to concrete tools and translate
/// arguments to form the list of jobs to run.
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 98ac6ccec5..e28b2bc6ed 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -250,14 +250,12 @@ Compilation *Driver::BuildCompilation(int argc, const char **argv) {
if (!HandleImmediateArgs(*C))
return C;
- // Construct the list of abstract actions to perform for this compilation. We
- // avoid passing a Compilation here simply to enforce the abstraction that
- // pipelining is not host or toolchain dependent (other than the driver driver
- // test).
+ // Construct the list of abstract actions to perform for this compilation.
if (Host->useDriverDriver())
- BuildUniversalActions(C->getArgs(), C->getActions());
+ BuildUniversalActions(C->getDefaultToolChain(), C->getArgs(),
+ C->getActions());
else
- BuildActions(C->getArgs(), C->getActions());
+ BuildActions(C->getDefaultToolChain(), C->getArgs(), C->getActions());
if (CCCPrintActions) {
PrintActions(*C);
@@ -527,7 +525,8 @@ static bool ContainsCompileAction(const Action *A) {
return false;
}
-void Driver::BuildUniversalActions(const ArgList &Args,
+void Driver::BuildUniversalActions(const ToolChain &TC,
+ const ArgList &Args,
ActionList &Actions) const {
llvm::PrettyStackTraceString CrashInfo("Building universal build actions");
// Collect the list of architectures. Duplicates are allowed, but should only
@@ -572,7 +571,7 @@ void Driver::BuildUniversalActions(const ArgList &Args,
}
ActionList SingleActions;
- BuildActions(Args, SingleActions);
+ BuildActions(TC, Args, SingleActions);
// Add in arch bindings for every top level action, as well as lipo and
// dsymutil steps if needed.
@@ -622,7 +621,8 @@ void Driver::BuildUniversalActions(const ArgList &Args,
}
}
-void Driver::BuildActions(const ArgList &Args, ActionList &Actions) const {
+void Driver::BuildActions(const ToolChain &TC, const ArgList &Args,
+ ActionList &Actions) const {
llvm::PrettyStackTraceString CrashInfo("Building compilation actions");
// Start by constructing the list of inputs and their types.