зеркало из https://github.com/microsoft/clang-1.git
Standardize Driver translation to call clang-cc using '-foo' form instead of '--foo'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89497 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
eeb7fd0ccf
Коммит
66861e09d5
|
@ -440,12 +440,12 @@ void Clang::AddX86TargetArgs(const ArgList &Args,
|
|||
true) ||
|
||||
Args.hasArg(options::OPT_mkernel) ||
|
||||
Args.hasArg(options::OPT_fapple_kext))
|
||||
CmdArgs.push_back("--disable-red-zone");
|
||||
CmdArgs.push_back("-disable-red-zone");
|
||||
|
||||
if (Args.hasFlag(options::OPT_msoft_float,
|
||||
options::OPT_mno_soft_float,
|
||||
false))
|
||||
CmdArgs.push_back("--no-implicit-float");
|
||||
CmdArgs.push_back("-no-implicit-float");
|
||||
|
||||
const char *CPUName = 0;
|
||||
if (const Arg *A = Args.getLastArg(options::OPT_march_EQ)) {
|
||||
|
@ -479,7 +479,7 @@ void Clang::AddX86TargetArgs(const ArgList &Args,
|
|||
}
|
||||
|
||||
if (CPUName) {
|
||||
CmdArgs.push_back("--mcpu");
|
||||
CmdArgs.push_back("-mcpu");
|
||||
CmdArgs.push_back(CPUName);
|
||||
}
|
||||
|
||||
|
@ -707,7 +707,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
else
|
||||
Model = getToolChain().GetDefaultRelocationModel();
|
||||
}
|
||||
CmdArgs.push_back("--relocation-model");
|
||||
CmdArgs.push_back("-relocation-model");
|
||||
CmdArgs.push_back(Model);
|
||||
|
||||
// Infer the __PIC__ value.
|
||||
|
@ -722,24 +722,24 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
}
|
||||
|
||||
if (Args.hasArg(options::OPT_ftime_report))
|
||||
CmdArgs.push_back("--time-passes");
|
||||
CmdArgs.push_back("-time-passes");
|
||||
// FIXME: Set --enable-unsafe-fp-math.
|
||||
if (Args.hasFlag(options::OPT_fno_omit_frame_pointer,
|
||||
options::OPT_fomit_frame_pointer))
|
||||
CmdArgs.push_back("--disable-fp-elim");
|
||||
CmdArgs.push_back("-disable-fp-elim");
|
||||
if (!Args.hasFlag(options::OPT_fzero_initialized_in_bss,
|
||||
options::OPT_fno_zero_initialized_in_bss,
|
||||
true))
|
||||
CmdArgs.push_back("--nozero-initialized-in-bss");
|
||||
CmdArgs.push_back("-nozero-initialized-in-bss");
|
||||
if (Args.hasArg(options::OPT_dA) || Args.hasArg(options::OPT_fverbose_asm))
|
||||
CmdArgs.push_back("--asm-verbose");
|
||||
CmdArgs.push_back("-asm-verbose");
|
||||
if (Args.hasArg(options::OPT_fdebug_pass_structure))
|
||||
CmdArgs.push_back("--debug-pass=Structure");
|
||||
CmdArgs.push_back("-debug-pass=Structure");
|
||||
if (Args.hasArg(options::OPT_fdebug_pass_arguments))
|
||||
CmdArgs.push_back("--debug-pass=Arguments");
|
||||
CmdArgs.push_back("-debug-pass=Arguments");
|
||||
if (!Args.hasFlag(options::OPT_fmerge_all_constants,
|
||||
options::OPT_fno_merge_all_constants))
|
||||
CmdArgs.push_back("--no-merge-all-constants");
|
||||
CmdArgs.push_back("-no-merge-all-constants");
|
||||
|
||||
// This is a coarse approximation of what llvm-gcc actually does, both
|
||||
// -fasynchronous-unwind-tables and -fnon-call-exceptions interact in more
|
||||
|
@ -751,9 +751,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
!Args.hasArg(options::OPT_mkernel));
|
||||
if (Args.hasFlag(options::OPT_funwind_tables, options::OPT_fno_unwind_tables,
|
||||
AsynchronousUnwindTables))
|
||||
CmdArgs.push_back("--unwind-tables=1");
|
||||
CmdArgs.push_back("-unwind-tables=1");
|
||||
else
|
||||
CmdArgs.push_back("--unwind-tables=0");
|
||||
CmdArgs.push_back("-unwind-tables=0");
|
||||
|
||||
// FIXME: Handle -mtune=.
|
||||
(void) Args.hasArg(options::OPT_mtune_EQ);
|
||||
|
@ -786,7 +786,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
CmdArgs.push_back("-fno-math-errno");
|
||||
|
||||
if (Arg *A = Args.getLastArg(options::OPT_flimited_precision_EQ)) {
|
||||
CmdArgs.push_back("--limit-float-precision");
|
||||
CmdArgs.push_back("-limit-float-precision");
|
||||
CmdArgs.push_back(A->getValue(Args));
|
||||
}
|
||||
|
||||
|
@ -865,7 +865,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
}
|
||||
|
||||
if (Args.hasArg(options::OPT__relocatable_pch))
|
||||
CmdArgs.push_back("--relocatable-pch");
|
||||
CmdArgs.push_back("-relocatable-pch");
|
||||
|
||||
if (Arg *A = Args.getLastArg(options::OPT_fconstant_string_class_EQ)) {
|
||||
CmdArgs.push_back("-fconstant-string-class");
|
||||
|
@ -1703,7 +1703,7 @@ void darwin::Compile::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
// to be a good reason.
|
||||
CmdArgs.push_back("/dev/null");
|
||||
|
||||
CmdArgs.push_back("--output-pch=");
|
||||
CmdArgs.push_back("-output-pch=");
|
||||
CmdArgs.push_back(Output.getFilename());
|
||||
}
|
||||
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
// RUN: grep '"-triple" "i386-unknown-unknown"' %t.log
|
||||
// RUN: grep '"-S"' %t.log
|
||||
// RUN: grep '"-disable-free"' %t.log
|
||||
// RUN: grep '"--relocation-model" "static"' %t.log
|
||||
// RUN: grep '"--disable-fp-elim"' %t.log
|
||||
// RUN: grep '"--unwind-tables=0"' %t.log
|
||||
// RUN: grep '"-relocation-model" "static"' %t.log
|
||||
// RUN: grep '"-disable-fp-elim"' %t.log
|
||||
// RUN: grep '"-unwind-tables=0"' %t.log
|
||||
// RUN: grep '"-Os"' %t.log
|
||||
// RUN: grep '"-o" .*clang-translation.*' %t.log
|
||||
// RUN: grep '"--asm-verbose"' %t.log
|
||||
// RUN: grep '"-asm-verbose"' %t.log
|
||||
// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S %s -o %t.s 2> %t.log
|
||||
// RUN: grep '"--mcpu" "yonah"' %t.log
|
||||
// RUN: grep '"-mcpu" "yonah"' %t.log
|
||||
// RUN: clang -ccc-host-triple x86_64-apple-darwin9 -### -S %s -o %t.s 2> %t.log
|
||||
// RUN: grep '"--mcpu" "core2"' %t.log
|
||||
// RUN: grep '"-mcpu" "core2"' %t.log
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S -msoft-float %s 2> %t.log
|
||||
// RUN: grep '"--no-implicit-float"' %t.log
|
||||
// RUN: grep '"-no-implicit-float"' %t.log
|
||||
|
||||
// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S -msoft-float -mno-soft-float %s 2> %t.log
|
||||
// RUN: grep '"--no-implicit-float"' %t.log | count 0
|
||||
// RUN: grep '"-no-implicit-float"' %t.log | count 0
|
||||
|
||||
// RUN: clang -ccc-host-triple i386-apple-darwin9 -### -S -mno-soft-float %s -msoft-float 2> %t.log
|
||||
// RUN: grep '"--no-implicit-float"' %t.log
|
||||
// RUN: grep '"-no-implicit-float"' %t.log
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче