LLVM 24.0.0git
MCTargetOptionsCommandFlags.cpp
Go to the documentation of this file.
1//===-- MCTargetOptionsCommandFlags.cpp -----------------------*- C++ //-*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains machine code-specific flags that are shared between
10// different command line tools.
11//
12//===----------------------------------------------------------------------===//
13
17
18using namespace llvm;
19
20#define OPTIONS_STRUCT_DECL
21#include "MCToolOptions.inc"
22
23#define OPTIONS_STRUCT_DEFS
24#include "MCToolOptions.inc"
25
29
31 return C.get<MCToolOptions>().target_abi;
32}
33
36 const MCToolOptions &Opts = C.get<MCToolOptions>();
38 Options.MCRelaxAll = Opts.mc_relax_all;
39 Options.MCIncrementalLinkerCompatible = Opts.incremental_linker_compatible;
40 Options.FDPIC = Opts.fdpic;
41 Options.Dwarf64 = Opts.dwarf64;
42 Options.DwarfVersion = Opts.dwarf_version;
43 Options.ShowMCInst = Opts.asm_show_inst;
44 Options.ABIName = Opts.target_abi;
45 Options.MCFatalWarnings = Opts.fatal_warnings;
46 Options.MCNoWarn = Opts.no_warn;
47 Options.MCNoDeprecatedWarn = Opts.no_deprecated_warn;
48 Options.MCNoTypeCheck = Opts.no_type_check;
49 Options.MCSaveTempLabels = Opts.save_temp_labels;
50 Options.Crel = Opts.crel;
51 Options.ImplicitMapSyms = Opts.implicit_mapsyms;
52 Options.X86RelaxRelocations = Opts.x86_relax_relocations;
53 Options.X86Sse2Avx = Opts.x86_sse2avx;
54 Options.DisableIntegratedAS = Opts.no_integrated_as;
55 Options.RelocSectionSym = Opts.reloc_section_sym;
56 Options.LargeEHEncoding = Opts.large_eh_encoding;
57 Options.EmitDwarfUnwind = Opts.emit_dwarf_unwind;
58 Options.EmitCompactUnwindNonCanonical =
59 Opts.emit_compact_unwind_non_canonical;
60 Options.EmitSFrameUnwind = Opts.gsframe;
61 Options.AsSecureLogFile = Opts.as_secure_log_file;
62
63 return Options;
64}
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static LVOptions Options
Definition LVOptions.cpp:25
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
Registers T::Global with cl::ParseCommandLineOptions.
LLVM_ABI MCTargetOptions getMCTargetOptions(const cl::LibraryOptionsContext &C)
LLVM_ABI StringRef getABIName(const cl::LibraryOptionsContext &C)
This is an optimization pass for GlobalISel generic memory operations.