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.

llvm-svn: 205265
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index f354d7c..ba4204a 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/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 @@
         }
       }
     }
-    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