summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mc
diff options
context:
space:
mode:
authorGeorge Rimar <grimar@accesssoftek.com>2016-05-27 10:06:16 +0000
committerGeorge Rimar <grimar@accesssoftek.com>2016-05-27 10:06:16 +0000
commite79fc3efcaa75242288e34063025c5418d711759 (patch)
tree9e974b951d5d21527747287cee31f89993d22637 /llvm/tools/llvm-mc
parent48dcd2b8061e433a0a7406cbf2a93e0ef4e45541 (diff)
downloadbcm5719-llvm-e79fc3efcaa75242288e34063025c5418d711759.tar.gz
bcm5719-llvm-e79fc3efcaa75242288e34063025c5418d711759.zip
Revert r270977 ([llvm-mc] - Teach llvm-mc to generate zlib styled compression sections.)
It broke buildbot: http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/builds/13585/steps/build/logs/stdio Initial commit message: [llvm-mc] - Teach llvm-mc to generate zlib styled compression sections. This patch is strongly based on previously reverted D20331. (because of gnuutils < 2.26 does not support compressed debug sections in non zlib-gnu style) Difference that this patch supports both zlib and zlib-gnu styles. -compress-debug-sections option now supports next values: -compress-debug-sections=zlib-gnu -compress-debug-sections=zlib -compress-debug-sections=none Previously specifying -compress-debug-sections enabled zlib-gnu compression, so anyone can put "-compress-debug-sections=zlib-gnu" to restore the behavior that was before this patch for case when compression was enabled. Differential revision: http://reviews.llvm.org/D20676 llvm-svn: 270978
Diffstat (limited to 'llvm/tools/llvm-mc')
-rw-r--r--llvm/tools/llvm-mc/llvm-mc.cpp19
1 files changed, 5 insertions, 14 deletions
diff --git a/llvm/tools/llvm-mc/llvm-mc.cpp b/llvm/tools/llvm-mc/llvm-mc.cpp
index d9e3798ee88..9ea8f2ef433 100644
--- a/llvm/tools/llvm-mc/llvm-mc.cpp
+++ b/llvm/tools/llvm-mc/llvm-mc.cpp
@@ -52,18 +52,9 @@ OutputFilename("o", cl::desc("Output filename"),
static cl::opt<bool>
ShowEncoding("show-encoding", cl::desc("Show instruction encodings"));
-static cl::opt<DebugCompressionType>
-CompressDebugSections("compress-debug-sections", cl::ValueOptional,
- cl::init(DebugCompressionType::DCT_None),
- cl::desc("Choose DWARF debug sections compression:"),
- cl::values(
- clEnumValN(DebugCompressionType::DCT_None, "none",
- "No compression"),
- clEnumValN(DebugCompressionType::DCT_Zlib, "zlib",
- "Use zlib compression"),
- clEnumValN(DebugCompressionType::DCT_ZlibGnu, "zlib-gnu",
- "Use zlib-gnu compression (depricated)"),
- clEnumValEnd));
+static cl::opt<bool>
+CompressDebugSections("compress-debug-sections",
+ cl::desc("Compress DWARF debug sections"));
static cl::opt<bool>
ShowInst("show-inst", cl::desc("Show internal instruction representation"));
@@ -416,13 +407,13 @@ int main(int argc, char **argv) {
std::unique_ptr<MCAsmInfo> MAI(TheTarget->createMCAsmInfo(*MRI, TripleName));
assert(MAI && "Unable to create target asm info!");
- if (CompressDebugSections != DebugCompressionType::DCT_None) {
+ if (CompressDebugSections) {
if (!zlib::isAvailable()) {
errs() << ProgName
<< ": build tools with zlib to enable -compress-debug-sections";
return 1;
}
- MAI->setCompressDebugSections(CompressDebugSections);
+ MAI->setCompressDebugSections(true);
}
// FIXME: This is not pretty. MCContext has a ptr to MCObjectFileInfo and
OpenPOWER on IntegriCloud