forked from OSchip/llvm-project
Integrated-As: Support -Wa,-L when using the integrated assembler.
llvm-svn: 128433
This commit is contained in:
parent
9cf7bc7a6c
commit
67919b2a5b
|
@ -160,7 +160,9 @@ def backend_option : Separate<"-backend-option">,
|
|||
def mregparm : Separate<"-mregparm">,
|
||||
HelpText<"Limit the number of registers available for integer arguments">;
|
||||
def mrelax_all : Flag<"-mrelax-all">,
|
||||
HelpText<"Relax all machine instructions">;
|
||||
HelpText<"(integrated-as) Relax all machine instructions">;
|
||||
def msave_temp_labels : Flag<"-msave-temp-labels">,
|
||||
HelpText<"(integrated-as) Save temporary labels">;
|
||||
def mrtd: Flag<"-mrtd">,
|
||||
HelpText<"Make StdCall calling convention the default">;
|
||||
def mrelocation_model : Separate<"-mrelocation-model">,
|
||||
|
|
|
@ -77,6 +77,7 @@ public:
|
|||
unsigned OptimizeSize : 1; /// If -Os is specified.
|
||||
unsigned RelaxAll : 1; /// Relax all machine code instructions.
|
||||
unsigned RelaxedAliasing : 1; /// Set when -fno-strict-aliasing is enabled.
|
||||
unsigned SaveTempLabels : 1; /// Save temporary labels.
|
||||
unsigned SimplifyLibCalls : 1; /// Set when -fbuiltin is enabled.
|
||||
unsigned SoftFloat : 1; /// -soft-float.
|
||||
unsigned TimePasses : 1; /// Set when -ftime-report is enabled.
|
||||
|
@ -154,6 +155,7 @@ public:
|
|||
OptimizeSize = 0;
|
||||
RelaxAll = 0;
|
||||
RelaxedAliasing = 0;
|
||||
SaveTempLabels = 0;
|
||||
SimplifyLibCalls = 1;
|
||||
SoftFloat = 0;
|
||||
TimePasses = 0;
|
||||
|
|
|
@ -268,6 +268,8 @@ bool EmitAssemblyHelper::AddEmitPasses(BackendAction Action,
|
|||
|
||||
if (CodeGenOpts.RelaxAll)
|
||||
TM->setMCRelaxAll(true);
|
||||
if (CodeGenOpts.SaveTempLabels)
|
||||
TM->setMCSaveTempLabels(true);
|
||||
|
||||
// Create the code generator passes.
|
||||
PassManager *PM = getCodeGenPasses();
|
||||
|
|
|
@ -950,10 +950,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
if (Value == "-force_cpusubtype_ALL") {
|
||||
// Do nothing, this is the default and we don't support anything else.
|
||||
} else if (Value == "-L") {
|
||||
// We don't support -L yet, but it isn't important enough to error
|
||||
// on. No one should really be using it for a semantic change.
|
||||
D.Diag(clang::diag::warn_drv_unsupported_option_argument)
|
||||
<< A->getOption().getName() << Value;
|
||||
CmdArgs.push_back("-msave-temp-labels");
|
||||
} else {
|
||||
D.Diag(clang::diag::err_drv_unsupported_option_argument)
|
||||
<< A->getOption().getName() << Value;
|
||||
|
|
|
@ -197,6 +197,8 @@ static void CodeGenOptsToArgs(const CodeGenOptions &Opts,
|
|||
}
|
||||
if (Opts.RelaxAll)
|
||||
Res.push_back("-mrelax-all");
|
||||
if (Opts.SaveTempLabels)
|
||||
Res.push_back("-msave-temp-labels");
|
||||
if (Opts.SoftFloat)
|
||||
Res.push_back("-msoft-float");
|
||||
if (Opts.UnwindTables)
|
||||
|
@ -935,6 +937,7 @@ static void ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
|
|||
Opts.NumRegisterParameters = Args.getLastArgIntValue(OPT_mregparm, 0, Diags);
|
||||
Opts.RelaxAll = Args.hasArg(OPT_mrelax_all);
|
||||
Opts.OmitLeafFramePointer = Args.hasArg(OPT_momit_leaf_frame_pointer);
|
||||
Opts.SaveTempLabels = Args.hasArg(OPT_msave_temp_labels);
|
||||
Opts.SoftFloat = Args.hasArg(OPT_msoft_float);
|
||||
Opts.UnsafeFPMath = Args.hasArg(OPT_cl_unsafe_math_optimizations) ||
|
||||
Args.hasArg(OPT_cl_fast_relaxed_math);
|
||||
|
|
Loading…
Reference in New Issue