diff options
author | Martin Smith <martin.smith@qt.io> | 2018-03-09 10:39:54 +0100 |
---|---|---|
committer | Martin Smith <martin.smith@qt.io> | 2018-03-12 10:26:26 +0000 |
commit | c003a913e3dd71835577a8bba327007e8f3d06f8 (patch) | |
tree | d38f3f2045074d382ed5b194e31ffa6b9260f2d3 | |
parent | 863178beafc1ab903f1425d56a3e591f4c29cb4e (diff) | |
download | qttools-c003a913e3dd71835577a8bba327007e8f3d06f8.tar.gz |
qdoc: Remove -fPIC from default options when Q_OS_WIN
This update only adds -fPIC to the options passed to clang
if Q_OS_WIN is not defined.
Change-Id: I473ac14a026aecff141ab6d16e6283efe7bc5bd5
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
-rw-r--r-- | src/qdoc/clangcodeparser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qdoc/clangcodeparser.cpp b/src/qdoc/clangcodeparser.cpp index 5342bb34b..70d73a18e 100644 --- a/src/qdoc/clangcodeparser.cpp +++ b/src/qdoc/clangcodeparser.cpp @@ -1079,7 +1079,9 @@ void ClangCodeParser::parseHeaderFile(const Location & /*location*/, const QStri static const char *defaultArgs_[] = { "-std=c++14", +#ifndef Q_OS_WIN "-fPIC", +#endif "-fno-exceptions", // Workaround for clang bug http://reviews.llvm.org/D17988 "-DQ_QDOC", "-DQT_DISABLE_DEPRECATED_BEFORE=0", @@ -1442,7 +1444,7 @@ Node* ClangCodeParser::parseFnArg(const Location& location, const QString& fnArg CXTranslationUnit_SkipFunctionBodies | CXTranslationUnit_KeepGoing); // Change 2nd parameter to 1 to make clang report errors. - CXIndex index = clang_createIndex(1, 0); + CXIndex index = clang_createIndex(1, Generator::debugging() ? 1 : 0); std::vector<const char *> args(std::begin(defaultArgs_), std::end(defaultArgs_)); // Add the defines from the qdocconf file. |