зеркало из https://github.com/microsoft/clang-1.git
Don't warn about -funit-at-a-time, and reject -fno-unit-at-a-time.
- We could just warn about -fno-unit-at-a-time, but in practice people using it probably aren't going to get what they want out of clang. Also, use "clang" specified error for unsupported things instead of driver unsupported error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72272 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
3a5f5c57e0
Коммит
e027a4b239
|
@ -43,6 +43,8 @@ def err_drv_invalid_version_number : Error<
|
|||
"invalid version number in '%0'">;
|
||||
def err_drv_no_linker_llvm_support : Error<
|
||||
"'%0': unable to pass LLVM bit-code files to linker">;
|
||||
def err_drv_clang_unsupported : Error<
|
||||
"the clang compiler does not support '%0'">;
|
||||
|
||||
def warn_drv_input_file_unused : Warning<
|
||||
"%0: '%1' input unused when '%2' is present">;
|
||||
|
@ -57,6 +59,6 @@ def warn_drv_not_using_clang_cxx : Warning<
|
|||
def warn_drv_not_using_clang_arch : Warning<
|
||||
"not using the clang compiler for the '%0' architecture">;
|
||||
def warn_drv_clang_unsupported : Warning<
|
||||
"the clang compiler does not yet support '%0'">;
|
||||
"the clang compiler does not support '%0'">;
|
||||
|
||||
}
|
||||
|
|
|
@ -415,6 +415,7 @@ OPTION("-fno-pascal-strings", fno_pascal_strings, Flag, f_Group, INVALID, "", 0,
|
|||
OPTION("-fno-show-column", fno_show_column, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-fno-stack-protector", fno_stack_protector, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-fno-strict-aliasing", fno_strict_aliasing, Flag, clang_ignored_f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-fno-unit-at-a-time", fno_unit_at_a_time, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-fno-unwind-tables", fno_unwind_tables, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-fno-working-directory", fno_working_directory, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-fno-zero-initialized-in-bss", fno_zero_initialized_in_bss, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
|
@ -447,6 +448,7 @@ OPTION("-fterminated-vtables", fterminated_vtables, Flag, f_Group, INVALID, "",
|
|||
OPTION("-ftime-report", ftime_report, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-ftraditional", ftraditional, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-ftrapv", ftrapv, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-funit-at-a-time", funit_at_a_time, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-funsigned-bitfields", funsigned_bitfields, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-funwind-tables", funwind_tables, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
OPTION("-fverbose-asm", fverbose_asm, Flag, f_Group, INVALID, "", 0, 0, 0)
|
||||
|
|
|
@ -399,7 +399,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
if ((Unsupported = Args.getLastArg(options::OPT_MG)) ||
|
||||
(Unsupported = Args.getLastArg(options::OPT_MQ)) ||
|
||||
(Unsupported = Args.getLastArg(options::OPT_iframework)))
|
||||
D.Diag(clang::diag::err_drv_unsupported_opt)
|
||||
D.Diag(clang::diag::err_drv_clang_unsupported)
|
||||
<< Unsupported->getOption().getName();
|
||||
|
||||
Args.AddAllArgs(CmdArgs, options::OPT_v);
|
||||
|
@ -549,6 +549,14 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
CmdArgs.push_back("-fdollars-in-identifiers=0");
|
||||
}
|
||||
|
||||
// -funit-at-a-time is default, and we don't support -fno-unit-at-a-time for
|
||||
// practical purposes.
|
||||
if (Arg *A = Args.getLastArg(options::OPT_funit_at_a_time,
|
||||
options::OPT_fno_unit_at_a_time)) {
|
||||
if (A->getOption().matches(options::OPT_fno_unit_at_a_time))
|
||||
D.Diag(clang::diag::err_drv_clang_unsupported) << A->getAsString(Args);
|
||||
}
|
||||
|
||||
Args.AddLastArg(CmdArgs, options::OPT_dM);
|
||||
Args.AddLastArg(CmdArgs, options::OPT_dD);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче