summaryrefslogtreecommitdiffstats
path: root/clang/lib/Basic/FileManager.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <vonosmas@gmail.com>2015-07-30 00:50:40 +0000
committerAlexey Samsonov <vonosmas@gmail.com>2015-07-30 00:50:40 +0000
commitba46a47e07bb1982736136665f6f527466fdbf4d (patch)
tree7546b83a08f6570485a50811654241dcebed3b6c /clang/lib/Basic/FileManager.cpp
parent95c14f59a87a9dd30d78b12e84df3f231837e5dd (diff)
downloadbcm5719-llvm-ba46a47e07bb1982736136665f6f527466fdbf4d.tar.gz
bcm5719-llvm-ba46a47e07bb1982736136665f6f527466fdbf4d.zip
[Sanitizer] Replace diagnostic string literal to workaround CMake 2.8 bug.
Let me tell you a story. Suppose you want to build your project (e.g. LLVM) with CMake 2.8, Clang and AddressSanitizer. You also want to ensure that Clang is fresh enough and check that CMAKE_CXX_COMPILER_VERSION is 3.1+. This check would fail - CMake would fail to correctly calculate compiler version if you pass CMAKE_CXX_FLAGS=-fsanitize=address. The problem is funky compiler version calculation in CMakeDetermineCompilerId.cmake module: it compiles the sample source file with provided compiler and compile flags, runs "strings" and greps for "INFO:" ASCII strings contained on the executable to fetch "INFO:compiler", "INFO:compiler_version" etc. It limits the output of grep to just 4 lines. Unfortunately, if your executable was built with ASan, it would also contain an ASCII string INFO: %s ignores mlock/mlockall/munlock/munlockall and INFO:compiler_version string would never be parsed. All of the above actually happened after r243574 when we tried to configure libcxx with just-built Clang with TSan/MSan, and the version check mentioned above failed in HandleLLVMOptions.cmake (╯°□°)╯.~.┻━┻ llvm-svn: 243599
Diffstat (limited to 'clang/lib/Basic/FileManager.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud