[MC, COFF] Support link /incremental conditionally
[oota-llvm.git] / include / llvm / MC / MCTargetOptionsCommandFlags.h
index 1240e135ea0a146509771ee0e5fed07a04c3eda5..5180208d33b655f3047174a2bc9b168010e8712e 100644 (file)
@@ -33,6 +33,12 @@ cl::opt<bool> RelaxAll("mc-relax-all",
                        cl::desc("When used with filetype=obj, "
                                 "relax all fixups in the emitted object file"));
 
+cl::opt<bool> IncrementalLinkerCompatible(
+    "incremental-linker-compatible",
+    cl::desc(
+        "When used with filetype=obj, "
+        "emit an object file which can be used with an incremental linker"));
+
 cl::opt<int> DwarfVersion("dwarf-version", cl::desc("Dwarf version"),
                           cl::init(0));
 
@@ -56,6 +62,7 @@ static inline MCTargetOptions InitMCTargetOptionsFromFlags() {
   Options.SanitizeAddress =
       (AsmInstrumentation == MCTargetOptions::AsmInstrumentationAddress);
   Options.MCRelaxAll = RelaxAll;
+  Options.MCIncrementalLinkerCompatible = IncrementalLinkerCompatible;
   Options.DwarfVersion = DwarfVersion;
   Options.ShowMCInst = ShowMCInst;
   Options.ABIName = ABIName;