Commit 863178be authored by Edward Welbourne's avatar Edward Welbourne Committed by Topi Reiniö
Browse files

Revert the heinous sysinc hack qdoc needed for clang 3.9

This reverts commits c95cba39 and
65d81734

.  Apparently clang is now
smart enough to handle its system include paths itself; and trying to
"help" was causing problems.  It was, in any case, a heinous hack.

Task-number: QTBUG-66746
Change-Id: I485c6acddfd89f91a4b719f2e2e049ff76a61ce9
Reviewed-by: default avatarMartin Smith <martin.smith@qt.io>
Reviewed-by: default avatarTopi Reiniö <topi.reinio@qt.io>
Showing with 1 addition and 34 deletions
...@@ -26,16 +26,6 @@ ...@@ -26,16 +26,6 @@
** **
****************************************************************************/ ****************************************************************************/
#ifdef HEINOUS_SYSINC_HACK // There must be no #include before this !
#define setlocale locale_file_name_for_clang_qdoc() { \
static char data[] = __FILE__; \
return data; \
} \
extern char *setlocale
#include <locale.h>
#undef setlocale
#endif // HEINOUS_SYSINC_HACK
#include <qglobal.h> #include <qglobal.h>
#include <qhashfunctions.h> #include <qhashfunctions.h>
#include <stdlib.h> #include <stdlib.h>
...@@ -665,22 +655,6 @@ QDocCommandLineParser::QDocCommandLineParser() ...@@ -665,22 +655,6 @@ QDocCommandLineParser::QDocCommandLineParser()
addOption(frameworkOption); addOption(frameworkOption);
} }
#ifdef HEINOUS_SYSINC_HACK
/*!
Return the system include directory used when compiling this file.
*/
static QByteArray getSystemIncludePath()
{
const char *raw = locale_file_name_for_clang_qdoc();
const char *slash = strrchr(raw, '/');
if (slash == NULL)
slash = strrchr(raw, '\\');
if (slash == NULL)
return QByteArray();
return QByteArray(raw, slash - raw);
}
#endif // HEINOUS_SYSINC_HACK
void QDocCommandLineParser::process(const QCoreApplication &app) void QDocCommandLineParser::process(const QCoreApplication &app)
{ {
QCommandLineParser::process(app); QCommandLineParser::process(app);
...@@ -730,11 +704,7 @@ void QDocCommandLineParser::process(const QCoreApplication &app) ...@@ -730,11 +704,7 @@ void QDocCommandLineParser::process(const QCoreApplication &app)
const auto paths = values(includePathOption); const auto paths = values(includePathOption);
for (const auto &i : paths) for (const auto &i : paths)
includesPaths << "-I" << currentDir.absoluteFilePath(i); includesPaths << "-I" << currentDir.absoluteFilePath(i);
auto paths2 = values(includePathSystemOption); const auto paths2 = values(includePathSystemOption);
#ifdef HEINOUS_SYSINC_HACK
if (paths2.isEmpty())
paths2 << QString(getSystemIncludePath());
#endif // HEINOUS_SYSINC_HACK
for (const auto &i : paths2) for (const auto &i : paths2)
includesPaths << "-isystem" << currentDir.absoluteFilePath(i); includesPaths << "-isystem" << currentDir.absoluteFilePath(i);
const auto paths3 = values(frameworkOption); const auto paths3 = values(frameworkOption);
......
...@@ -26,9 +26,6 @@ INCLUDEPATH += $$QT_SOURCE_TREE/src/tools/qdoc \ ...@@ -26,9 +26,6 @@ INCLUDEPATH += $$QT_SOURCE_TREE/src/tools/qdoc \
# Increase the stack size on MSVC to 4M to avoid a stack overflow # Increase the stack size on MSVC to 4M to avoid a stack overflow
win32-icc*|win32-msvc*:{ win32-icc*|win32-msvc*:{
QMAKE_LFLAGS += /STACK:4194304 QMAKE_LFLAGS += /STACK:4194304
} else {
# (MSVC objects to defining a function in the locale.h dllimport context)
DEFINES += HEINOUS_SYSINC_HACK
} }
HEADERS += atom.h \ HEADERS += atom.h \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment