aboutsummaryrefslogtreecommitdiffstats
path: root/ELF
diff options
context:
space:
mode:
Diffstat (limited to 'ELF')
-rw-r--r--ELF/Driver.cpp2
-rw-r--r--ELF/Options.td4
2 files changed, 4 insertions, 2 deletions
diff --git a/ELF/Driver.cpp b/ELF/Driver.cpp
index 4630e110bcd8..47a50bb725e7 100644
--- a/ELF/Driver.cpp
+++ b/ELF/Driver.cpp
@@ -638,7 +638,7 @@ void LinkerDriver::readConfigs(opt::InputArgList &Args) {
Config->Fini = Args.getLastArgValue(OPT_fini, "_fini");
Config->GcSections = getArg(Args, OPT_gc_sections, OPT_no_gc_sections, false);
Config->GdbIndex = Args.hasArg(OPT_gdb_index);
- Config->ICF = Args.hasArg(OPT_icf);
+ Config->ICF = getArg(Args, OPT_icf_all, OPT_icf_none, false);
Config->Init = Args.getLastArgValue(OPT_init, "_init");
Config->LTOAAPipeline = Args.getLastArgValue(OPT_lto_aa_pipeline);
Config->LTONewPmPasses = Args.getLastArgValue(OPT_lto_newpm_passes);
diff --git a/ELF/Options.td b/ELF/Options.td
index 9c78608118cc..1400a206bdfc 100644
--- a/ELF/Options.td
+++ b/ELF/Options.td
@@ -126,7 +126,9 @@ def hash_style: S<"hash-style">,
def help: F<"help">, HelpText<"Print option help">;
-def icf: F<"icf=all">, HelpText<"Enable identical code folding">;
+def icf_all: F<"icf=all">, HelpText<"Enable identical code folding">;
+
+def icf_none: F<"icf=none">, HelpText<"Disable identical code folding">;
def image_base : J<"image-base=">, HelpText<"Set the base address">;