]> granicus.if.org Git - clang/commitdiff
Workaround module test failures by removing the version info from module hashes.
authorBob Wilson <bob.wilson@apple.com>
Wed, 7 Mar 2012 23:50:05 +0000 (23:50 +0000)
committerBob Wilson <bob.wilson@apple.com>
Wed, 7 Mar 2012 23:50:05 +0000 (23:50 +0000)
PR12196: The module hash strings are not actually hashing the compiler version
string; the entire version string is being included in the hash.  Depending on
the module cache directory name, that can lead to failures where the path
names become too long.  As a temporary workaround, just remove the version
string from the hash.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152266 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/CompilerInvocation.cpp

index 7038e85c4a5724720fc9691837f37fc96f513503..9ccd9b23730ed9f7307de0e2090c9081c086d7de 100644 (file)
@@ -2196,7 +2196,10 @@ std::string CompilerInvocation::getModuleHash() const {
   ModuleSignature Signature;
   
   // Start the signature with the compiler version.
-  Signature.add(getClangFullRepositoryVersion());
+  // FIXME: The full version string can be quite long.  Omit it from the
+  // module hash for now to avoid failures where the path name becomes too
+  // long.  An MD5 or similar checksum would work well here.
+  // Signature.add(getClangFullRepositoryVersion());
   
   // Extend the signature with the language options
 #define LANGOPT(Name, Bits, Default, Description) \