summaryrefslogtreecommitdiffstats
path: root/lld/ELF/Driver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/ELF/Driver.cpp')
-rw-r--r--lld/ELF/Driver.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/lld/ELF/Driver.cpp b/lld/ELF/Driver.cpp
index 816eb77bb178..2439d141fb66 100644
--- a/lld/ELF/Driver.cpp
+++ b/lld/ELF/Driver.cpp
@@ -1224,9 +1224,10 @@ static void readConfigs(opt::InputArgList &args) {
config->checkSections =
args.hasFlag(OPT_check_sections, OPT_no_check_sections, true);
config->chroot = args.getLastArgValue(OPT_chroot);
- config->compressDebugSections = getCompressionType(
- args.getLastArgValue(OPT_compress_debug_sections, "none"),
- "--compress-debug-sections");
+ if (auto *arg = args.getLastArg(OPT_compress_debug_sections)) {
+ config->compressDebugSections =
+ getCompressionType(arg->getValue(), "--compress-debug-sections");
+ }
config->cref = args.hasArg(OPT_cref);
config->optimizeBBJumps =
args.hasFlag(OPT_optimize_bb_jumps, OPT_no_optimize_bb_jumps, false);
@@ -1516,7 +1517,7 @@ static void readConfigs(opt::InputArgList &args) {
}
}
- for (opt::Arg *arg : args.filtered(OPT_compress_nonalloc_sections)) {
+ for (opt::Arg *arg : args.filtered(OPT_compress_sections)) {
SmallVector<StringRef, 0> fields;
StringRef(arg->getValue()).split(fields, '=');
if (fields.size() != 2 || fields[1].empty()) {
@@ -1526,7 +1527,7 @@ static void readConfigs(opt::InputArgList &args) {
}
auto type = getCompressionType(fields[1], arg->getSpelling());
if (Expected<GlobPattern> pat = GlobPattern::create(fields[0])) {
- config->compressNonAllocSections.emplace_back(std::move(*pat), type);
+ config->compressSections.emplace_back(std::move(*pat), type);
} else {
error(arg->getSpelling() + ": " + toString(pat.takeError()));
continue;