diff options
| author | David Blaikie <dblaikie@gmail.com> | 2014-03-31 23:29:38 +0000 |
|---|---|---|
| committer | David Blaikie <dblaikie@gmail.com> | 2014-03-31 23:29:38 +0000 |
| commit | e3989ea116ea77ecbfc1699dd862692f817ddae9 (patch) | |
| tree | 2f4876426c04f28f2cfd739149f5cd0b93207e8a /lib/Driver/Tools.cpp | |
| parent | af63dddc586e02fd3cd36d5635db43f1682814a2 (diff) | |
| download | clang-e3989ea116ea77ecbfc1699dd862692f817ddae9.tar.gz clang-e3989ea116ea77ecbfc1699dd862692f817ddae9.tar.bz2 clang-e3989ea116ea77ecbfc1699dd862692f817ddae9.tar.xz | |
Warn when requesting compress-debug-sections and zlib is not available
Another shot in the dark, since I do have zlib installed. Will be
watching the bots for fallout.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205265 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
| -rw-r--r-- | lib/Driver/Tools.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index f354d7c407..ba4204a391 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -29,6 +29,7 @@ #include "llvm/Option/Arg.h" #include "llvm/Option/ArgList.h" #include "llvm/Option/Option.h" +#include "llvm/Support/Compression.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/Format.h" @@ -1823,8 +1824,12 @@ static void CollectArgsForIntegratedAssembler(Compilation &C, } } } - if (CompressDebugSections) - CmdArgs.push_back("-compress-debug-sections"); + if (CompressDebugSections) { + if (llvm::zlib::isAvailable()) + CmdArgs.push_back("-compress-debug-sections"); + else + D.Diag(diag::warn_debug_compression_unavailable); + } } // Until ARM libraries are build separately, we have them all in one library |
