Changeset View
Changeset View
Standalone View
Standalone View
plugins/clang/duchain/parsesession.cpp
Show First 20 Lines • Show All 260 Lines • ▼ Show 20 Line(s) | 260 | if (!wrappedQtHeaders.isEmpty()) { | |||
---|---|---|---|---|---|
261 | smartArgs << wrappedQtHeaders; | 261 | smartArgs << wrappedQtHeaders; | ||
262 | clangArguments << "-isystem" << wrappedQtHeaders.constData(); | 262 | clangArguments << "-isystem" << wrappedQtHeaders.constData(); | ||
263 | const QByteArray qtCore = wrappedQtHeaders + "/QtCore"; | 263 | const QByteArray qtCore = wrappedQtHeaders + "/QtCore"; | ||
264 | smartArgs << qtCore; | 264 | smartArgs << qtCore; | ||
265 | clangArguments << "-isystem" << qtCore.constData(); | 265 | clangArguments << "-isystem" << qtCore.constData(); | ||
266 | } | 266 | } | ||
267 | } | 267 | } | ||
268 | 268 | | |||
269 | addIncludes(&clangArguments, &smartArgs, includes.system, "-isystem"); | 269 | addIncludes(&clangArguments, &smartArgs, includes.system, "-isystem"); | ||
aaronpuchert: This is where `/usr/include` comes from on Linux. Can you find out why `includes.system` is… | |||||
270 | addIncludes(&clangArguments, &smartArgs, includes.project, "-I"); | 270 | addIncludes(&clangArguments, &smartArgs, includes.project, "-I"); | ||
271 | 271 | | |||
272 | const auto& frameworkDirectories = environment.frameworkDirectories(); | 272 | const auto& frameworkDirectories = environment.frameworkDirectories(); | ||
273 | addFrameworkDirectories(&clangArguments, &smartArgs, frameworkDirectories.system, "-iframework"); | 273 | addFrameworkDirectories(&clangArguments, &smartArgs, frameworkDirectories.system, "-iframework"); | ||
274 | addFrameworkDirectories(&clangArguments, &smartArgs, frameworkDirectories.project, "-F"); | 274 | addFrameworkDirectories(&clangArguments, &smartArgs, frameworkDirectories.project, "-F"); | ||
275 | 275 | | |||
276 | // libclang cannot find it's builtin dir automatically, we have to specify it manually | 276 | // libclang cannot find it's builtin dir automatically, we have to specify it manually | ||
277 | smartArgs << ClangIntegration::DUChainUtils::clangBuiltinIncludePath().toUtf8(); | 277 | smartArgs << ClangIntegration::DUChainUtils::clangBuiltinIncludePath().toUtf8(); | ||
278 | clangArguments << "-isystem" << smartArgs.last().constData(); | 278 | clangArguments << "-isystem" << smartArgs.last().constData(); | ||
279 | 279 | | |||
280 | smartArgs << writeDefinesFile(environment.defines()); | 280 | smartArgs << writeDefinesFile(environment.defines()); | ||
281 | clangArguments << "-imacros" << smartArgs.last().constData(); | 281 | clangArguments << "-imacros" << smartArgs.last().constData(); | ||
282 | 282 | | |||
283 | #ifdef __FreeBSD__ | ||||
284 | clangArguments << "-isystem" << "/usr/include"; | ||||
285 | #endif | ||||
283 | // append extra args from environment variable | 286 | // append extra args from environment variable | ||
284 | static const auto extraArgs = ::extraArgs(); | 287 | static const auto extraArgs = ::extraArgs(); | ||
285 | foreach (const QByteArray& arg, extraArgs) { | 288 | foreach (const QByteArray& arg, extraArgs) { | ||
286 | clangArguments << arg.constData(); | 289 | clangArguments << arg.constData(); | ||
287 | } | 290 | } | ||
288 | 291 | | |||
289 | QVector<CXUnsavedFile> unsaved; | 292 | QVector<CXUnsavedFile> unsaved; | ||
290 | //For PrecompiledHeader, we don't want unsaved contents (and contents.isEmpty()) | 293 | //For PrecompiledHeader, we don't want unsaved contents (and contents.isEmpty()) | ||
▲ Show 20 Lines • Show All 245 Lines • Show Last 20 Lines |
This is where /usr/include comes from on Linux. Can you find out why includes.system is (apparently) incomplete on FreeBSD?