mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-21 18:54:02 +00:00
clang: add -f{no-,}integrate-as as consistent parameters
The integrated assembler is a feature. This makes the new flags the default option, and the previous versions aliases. Ideally, at some point the aliases would be entirely removed. llvm-svn: 201963
This commit is contained in:
parent
39265b96b5
commit
cfeb90d7a8
@ -947,7 +947,6 @@ def verify_pch : Flag<["-"], "verify-pch">, Group<Action_Group>, Flags<[CC1Optio
|
||||
HelpText<"Load and verify that a pre-compiled header file is not stale">;
|
||||
def init : Separate<["-"], "init">;
|
||||
def install__name : Separate<["-"], "install_name">;
|
||||
def integrated_as : Flag<["-"], "integrated-as">, Flags<[DriverOption]>;
|
||||
def iprefix : JoinedOrSeparate<["-"], "iprefix">, Group<clang_i_Group>, Flags<[CC1Option]>,
|
||||
HelpText<"Set the -iwithprefix/-iwithprefixbefore prefix">, MetaVarName<"<dir>">;
|
||||
def iquote : JoinedOrSeparate<["-"], "iquote">, Group<clang_i_Group>, Flags<[CC1Option]>,
|
||||
@ -1191,7 +1190,6 @@ def mwarn_nonportable_cfstrings : Flag<["-"], "mwarn-nonportable-cfstrings">, Gr
|
||||
def no_canonical_prefixes : Flag<["-"], "no-canonical-prefixes">, Flags<[HelpHidden]>,
|
||||
HelpText<"Use relative instead of canonical paths">;
|
||||
def no_cpp_precomp : Flag<["-"], "no-cpp-precomp">, Group<clang_ignored_f_Group>;
|
||||
def no_integrated_as : Flag<["-"], "no-integrated-as">, Flags<[CC1Option, DriverOption]>;
|
||||
def no_integrated_cpp : Flag<["-", "--"], "no-integrated-cpp">, Flags<[DriverOption]>;
|
||||
def no_pedantic : Flag<["-", "--"], "no-pedantic">, Group<pedantic_Group>;
|
||||
def no__dead__strip__inits__and__terms : Flag<["-"], "no_dead_strip_inits_and_terms">;
|
||||
@ -1327,6 +1325,15 @@ def x : JoinedOrSeparate<["-"], "x">, Flags<[DriverOption,CC1Option]>,
|
||||
MetaVarName<"<language>">;
|
||||
def y : Joined<["-"], "y">;
|
||||
|
||||
def fintegrated_as : Flag<["-"], "fintegrated-as">, Flags<[DriverOption]>,
|
||||
Group<f_Group>, HelpText<"Enable the integrated assembler">;
|
||||
def fno_integrated_as : Flag<["-"], "fno-integrated-as">,
|
||||
Flags<[CC1Option, DriverOption]>, Group<f_Group>,
|
||||
HelpText<"Disable the integrated assembler">;
|
||||
def : Flag<["-"], "integrated-as">, Alias<fintegrated_as>, Flags<[DriverOption]>;
|
||||
def : Flag<["-"], "no-integrated-as">, Alias<fno_integrated_as>,
|
||||
Flags<[CC1Option, DriverOption]>;
|
||||
|
||||
def working_directory : JoinedOrSeparate<["-"], "working-directory">, Flags<[CC1Option]>,
|
||||
HelpText<"Resolve file paths relative to the specified directory">;
|
||||
def working_directory_EQ : Joined<["-"], "working-directory=">, Flags<[CC1Option]>,
|
||||
|
@ -38,8 +38,8 @@ const Driver &ToolChain::getDriver() const {
|
||||
}
|
||||
|
||||
bool ToolChain::useIntegratedAs() const {
|
||||
return Args.hasFlag(options::OPT_integrated_as,
|
||||
options::OPT_no_integrated_as,
|
||||
return Args.hasFlag(options::OPT_fintegrated_as,
|
||||
options::OPT_fno_integrated_as,
|
||||
IsIntegratedAssemblerDefault());
|
||||
}
|
||||
|
||||
|
@ -2521,7 +2521,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
Args.hasArg(options::OPT_dA))
|
||||
CmdArgs.push_back("-masm-verbose");
|
||||
|
||||
if (!Args.hasFlag(options::OPT_integrated_as, options::OPT_no_integrated_as,
|
||||
if (!Args.hasFlag(options::OPT_fintegrated_as, options::OPT_fno_integrated_as,
|
||||
IsIntegratedAssemblerDefault))
|
||||
CmdArgs.push_back("-no-integrated-as");
|
||||
|
||||
@ -4904,12 +4904,12 @@ void darwin::Assemble::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
SourceAction = SourceAction->getInputs()[0];
|
||||
}
|
||||
|
||||
// If -no_integrated_as is used add -Q to the darwin assember driver to make
|
||||
// If -fno_integrated_as is used add -Q to the darwin assember driver to make
|
||||
// sure it runs its system assembler not clang's integrated assembler.
|
||||
// Applicable to darwin11+ and Xcode 4+. darwin<10 lacked integrated-as.
|
||||
// FIXME: at run-time detect assembler capabilities or rely on version
|
||||
// information forwarded by -target-assembler-version (future)
|
||||
if (Args.hasArg(options::OPT_no_integrated_as)) {
|
||||
if (Args.hasArg(options::OPT_fno_integrated_as)) {
|
||||
const llvm::Triple &T(getToolChain().getTriple());
|
||||
if (!(T.isMacOSX() && T.isMacOSXVersionLT(10, 7)))
|
||||
CmdArgs.push_back("-Q");
|
||||
|
@ -366,7 +366,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
|
||||
(Opts.OptimizationLevel > 1 && !Opts.OptimizeSize));
|
||||
Opts.RerollLoops = Args.hasArg(OPT_freroll_loops);
|
||||
|
||||
Opts.DisableIntegratedAS = Args.hasArg(OPT_no_integrated_as);
|
||||
Opts.DisableIntegratedAS = Args.hasArg(OPT_fno_integrated_as);
|
||||
Opts.Autolink = !Args.hasArg(OPT_fno_autolink);
|
||||
Opts.SampleProfileFile = Args.getLastArgValue(OPT_fprofile_sample_use_EQ);
|
||||
Opts.ProfileInstrGenerate = Args.hasArg(OPT_fprofile_instr_generate);
|
||||
|
@ -3,6 +3,17 @@
|
||||
// CHECK: cc1as
|
||||
// CHECK: -mrelax-all
|
||||
|
||||
// RUN: %clang -### -fintegrated-as -c -save-temps %s 2>&1 | FileCheck %s -check-prefix FIAS
|
||||
|
||||
// FIAS: cc1as
|
||||
|
||||
// RUN: %clang -### -fno-integrated-as -S %s 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix NOFIAS
|
||||
|
||||
// NOFIAS-NOT: cc1as
|
||||
// NOFIAS: -cc1
|
||||
// NOFIAS: -no-integrated-as
|
||||
|
||||
// RUN: %clang -### -c -integrated-as -Wa,-compress-debug-sections -Wno-missing-debug-compression %s 2>&1 | FileCheck --check-prefix=COMPRESS_DEBUG_QUIET %s
|
||||
// COMPRESS_DEBUG_QUIET-NOT: warning: DWARF compression is not implemented
|
||||
// COMPRESS_DEBUG_QUIET-NOT: warning: argument unused during compilation
|
||||
|
Loading…
x
Reference in New Issue
Block a user