diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-03-27 20:47:30 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-03-27 20:47:30 +0000 |
commit | 7e2fd943ae4f91c74beeb84cdfbb1499bfcf2ea9 (patch) | |
tree | a335d639a3d2c1cdbd8ef4088cea173f614de8e0 /clang/tools/driver/cc1as_main.cpp | |
parent | 7400a979521a70be4d69071271e4543014fbfcf5 (diff) | |
download | bcm5719-llvm-7e2fd943ae4f91c74beeb84cdfbb1499bfcf2ea9.tar.gz bcm5719-llvm-7e2fd943ae4f91c74beeb84cdfbb1499bfcf2ea9.zip |
Support for -Wa,-compress-debug-sections.
Also, while I'm here, support -nocompress-debug-sections too.
llvm-svn: 204959
Diffstat (limited to 'clang/tools/driver/cc1as_main.cpp')
-rw-r--r-- | clang/tools/driver/cc1as_main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/tools/driver/cc1as_main.cpp b/clang/tools/driver/cc1as_main.cpp index bd74d36579d..c6bc870c0b9 100644 --- a/clang/tools/driver/cc1as_main.cpp +++ b/clang/tools/driver/cc1as_main.cpp @@ -85,6 +85,7 @@ struct AssemblerInvocation { unsigned NoInitialTextSection : 1; unsigned SaveTemporaryLabels : 1; unsigned GenDwarfForAssembly : 1; + unsigned CompressDebugSections : 1; std::string DwarfDebugFlags; std::string DwarfDebugProducer; std::string DebugCompilationDir; @@ -186,6 +187,7 @@ bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts, Opts.NoInitialTextSection = Args->hasArg(OPT_n); Opts.SaveTemporaryLabels = Args->hasArg(OPT_msave_temp_labels); Opts.GenDwarfForAssembly = Args->hasArg(OPT_g); + Opts.CompressDebugSections = Args->hasArg(OPT_compress_debug_sections); Opts.DwarfDebugFlags = Args->getLastArgValue(OPT_dwarf_debug_flags); Opts.DwarfDebugProducer = Args->getLastArgValue(OPT_dwarf_debug_producer); Opts.DebugCompilationDir = Args->getLastArgValue(OPT_fdebug_compilation_dir); @@ -318,6 +320,8 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts, Ctx.setCompilationDir(Opts.DebugCompilationDir); if (!Opts.MainFileName.empty()) Ctx.setMainFileName(StringRef(Opts.MainFileName)); + if (Opts.CompressDebugSections) + MAI->setCompressDebugSections(true); // Build up the feature string from the target feature list. std::string FS; |