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 | d87684dddb2bc16bfc8494ac856dfb53fb4d8348 (patch) | |
| tree | 4c1f6de56bb3e1250c2e4906869ab9107d0789b0 /lib/Driver/Tools.cpp | |
| parent | d35cc359e1572d9bdd8ea3ca83da79722c034b79 (diff) | |
| download | clang-d87684dddb2bc16bfc8494ac856dfb53fb4d8348.tar.gz clang-d87684dddb2bc16bfc8494ac856dfb53fb4d8348.tar.bz2 clang-d87684dddb2bc16bfc8494ac856dfb53fb4d8348.tar.xz | |
Support for -Wa,-compress-debug-sections.
Also, while I'm here, support -nocompress-debug-sections too.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204959 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
| -rw-r--r-- | lib/Driver/Tools.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 5b997e7d37..756815147c 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1724,6 +1724,7 @@ static void CollectArgsForIntegratedAssembler(Compilation &C, // When using an integrated assembler, translate -Wa, and -Xassembler // options. + bool CompressDebugSections = false; for (arg_iterator it = Args.filtered_begin(options::OPT_Wa_COMMA, options::OPT_Xassembler), ie = Args.filtered_end(); it != ie; ++it) { @@ -1749,7 +1750,10 @@ static void CollectArgsForIntegratedAssembler(Compilation &C, CmdArgs.push_back("-mnoexecstack"); } else if (Value == "-compress-debug-sections" || Value == "--compress-debug-sections") { - D.Diag(diag::warn_missing_debug_compression); + CompressDebugSections = true; + } else if (Value == "-nocompress-debug-sections" || + Value == "--nocompress-debug-sections") { + CompressDebugSections = false; } else if (Value.startswith("-I")) { CmdArgs.push_back(Value.data()); // We need to consume the next argument if the current arg is a plain @@ -1762,6 +1766,8 @@ static void CollectArgsForIntegratedAssembler(Compilation &C, } } } + if (CompressDebugSections) + CmdArgs.push_back("-compress-debug-sections"); } // Until ARM libraries are build separately, we have them all in one library |
