mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-04 07:35:24 +02:00
Bug 579668 - Regression in Docker header file support
- fix CBuildConfiguration.getScannerInformation() method to look to see if the toolchain is a ContainerGCCToolChain but the include paths have nothing pointing to the special HEADERS directory for copying over Image headers to the host in which case do a fix-up by calculating the scanner info again and massaging the include paths as needed Change-Id: If6f76ef6ffb1bc5958377c565e4847989d5de0db
This commit is contained in:
parent
8dc7748433
commit
8221562d8b
1 changed files with 19 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2015, 2019 QNX Software Systems and others.
|
* Copyright (c) 2015, 2022 QNX Software Systems and others.
|
||||||
*
|
*
|
||||||
* This program and the accompanying materials
|
* This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License 2.0
|
* are made available under the terms of the Eclipse Public License 2.0
|
||||||
|
@ -729,7 +729,24 @@ public abstract class CBuildConfiguration extends PlatformObject implements ICBu
|
||||||
synchronized (scannerInfoLock) {
|
synchronized (scannerInfoLock) {
|
||||||
info = scannerInfoCache.getScannerInfo(resource);
|
info = scannerInfoCache.getScannerInfo(resource);
|
||||||
}
|
}
|
||||||
if (info == null || info.getIncludePaths().length == 0) {
|
// Following is a kludge to fix Bug 579668 whereby sometimes a timing
|
||||||
|
// bug occurs and scanner info for a project that specifies a container target
|
||||||
|
// has not initialized the include paths correctly to point to copied includes
|
||||||
|
// from the image target. We check to see if org.eclipse.cdt.docker.launcher is
|
||||||
|
// found in the include paths which is the .plugin directory where we copy headers
|
||||||
|
// to in the .metadata folder.
|
||||||
|
boolean needsFixing = false;
|
||||||
|
if (info != null && info.getIncludePaths().length > 0 && toolChain != null
|
||||||
|
&& toolChain.getId().startsWith("gcc-img-sha")) { //$NON-NLS-1$
|
||||||
|
needsFixing = true;
|
||||||
|
for (String includePath : info.getIncludePaths()) {
|
||||||
|
if (includePath.contains("org.eclipse.cdt.docker.launcher")) { //$NON-NLS-1$
|
||||||
|
needsFixing = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (info == null || info.getIncludePaths().length == 0 || needsFixing) {
|
||||||
ICElement celement = CCorePlugin.getDefault().getCoreModel().create(resource);
|
ICElement celement = CCorePlugin.getDefault().getCoreModel().create(resource);
|
||||||
if (celement instanceof ITranslationUnit) {
|
if (celement instanceof ITranslationUnit) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Reference in a new issue