Add the -mstackrealign option which just communicates the need to
force align the stack to the backend.
Fixes rdar://9289631
llvm-svn: 130725
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 89cf228..bf73ca2 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -1546,6 +1546,12 @@
CmdArgs.push_back(Args.MakeArgString(llvm::Twine(StackProtectorLevel)));
}
+ // Translate -mstackrealign
+ if (Args.hasArg(options::OPT_mstackrealign)) {
+ CmdArgs.push_back("-backend-option");
+ CmdArgs.push_back("-force-align-stack");
+ }
+
// Forward -f options with positive and negative forms; we translate
// these by hand.