diff options
author | Sylvestre Ledru <sylvestre@debian.org> | 2019-07-13 06:27:35 +0000 |
---|---|---|
committer | Sylvestre Ledru <sylvestre@debian.org> | 2019-07-13 06:27:35 +0000 |
commit | 21a92a8a559ba27907290bafd181e490101a4fcb (patch) | |
tree | cd6f039ace38701b231801c4ea6ea75050560182 /clang/lib/Frontend/InitPreprocessor.cpp | |
parent | 1447b60eeb2b3026a0c96bef052843a71002d617 (diff) | |
download | llvm-21a92a8a559ba27907290bafd181e490101a4fcb.zip llvm-21a92a8a559ba27907290bafd181e490101a4fcb.tar.gz llvm-21a92a8a559ba27907290bafd181e490101a4fcb.tar.bz2 |
This reverts commit 632a36bfcfc8273c1861f04ff6758d863c47c784.
Some targets such as Python 2.7.16 still use VERSION in
their builds. Without VERSION defined, the source code
has syntax errors.
Reverting as it will probably break many other things.
Noticed by Sterling Augustine
llvm-svn: 365992
Diffstat (limited to 'clang/lib/Frontend/InitPreprocessor.cpp')
-rw-r--r-- | clang/lib/Frontend/InitPreprocessor.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Frontend/InitPreprocessor.cpp b/clang/lib/Frontend/InitPreprocessor.cpp index a02c266..1741ba5 100644 --- a/clang/lib/Frontend/InitPreprocessor.cpp +++ b/clang/lib/Frontend/InitPreprocessor.cpp @@ -604,6 +604,12 @@ static void InitializePredefinedMacros(const TargetInfo &TI, // Support for #pragma redefine_extname (Sun compatibility) Builder.defineMacro("__PRAGMA_REDEFINE_EXTNAME", "1"); + // As sad as it is, enough software depends on the __VERSION__ for version + // checks that it is necessary to report 4.2.1 (the base GCC version we claim + // compatibility with) first. + Builder.defineMacro("__VERSION__", "\"4.2.1 Compatible " + + Twine(getClangFullCPPVersion()) + "\""); + // Initialize language-specific preprocessor defines. // Standard conforming mode? |