mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
Bug 182173 - My final fix to make sure the build environment settings get passed down to the external commands to properly find the compiler.
This commit is contained in:
parent
03d6dd70f8
commit
0ead6fa666
1 changed files with 18 additions and 1 deletions
|
@ -11,7 +11,14 @@
|
||||||
package org.eclipse.cdt.make.internal.core.scannerconfig.jobs;
|
package org.eclipse.cdt.make.internal.core.scannerconfig.jobs;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
|
import org.eclipse.cdt.core.envvar.IEnvironmentVariable;
|
||||||
|
import org.eclipse.cdt.core.envvar.IEnvironmentVariableManager;
|
||||||
|
import org.eclipse.cdt.core.model.CoreModel;
|
||||||
|
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||||
|
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||||
import org.eclipse.cdt.make.core.MakeCorePlugin;
|
import org.eclipse.cdt.make.core.MakeCorePlugin;
|
||||||
import org.eclipse.cdt.make.core.scannerconfig.IExternalScannerInfoProvider;
|
import org.eclipse.cdt.make.core.scannerconfig.IExternalScannerInfoProvider;
|
||||||
import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2;
|
import org.eclipse.cdt.make.core.scannerconfig.IScannerConfigBuilderInfo2;
|
||||||
|
@ -87,7 +94,17 @@ public class SCJobsUtil {
|
||||||
ISafeRunnable runnable = new ISafeRunnable() {
|
ISafeRunnable runnable = new ISafeRunnable() {
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
esiProvider.invokeProvider(monitor, project, context, providerId, buildInfo, collector, null);
|
// TODO we need the environment for the project here...
|
||||||
|
ICProjectDescription projDesc = CoreModel.getDefault().getProjectDescription(project);
|
||||||
|
ICConfigurationDescription configDesc = projDesc.getActiveConfiguration();
|
||||||
|
IEnvironmentVariableManager envVarManager = CCorePlugin.getDefault().getBuildEnvironmentManager();
|
||||||
|
IEnvironmentVariable[] envVars = envVarManager.getVariables(configDesc, true);
|
||||||
|
Properties env = new Properties();
|
||||||
|
for (int i = 0; i < envVars.length; ++i) {
|
||||||
|
IEnvironmentVariable envVar = envVars[i];
|
||||||
|
env.put(envVar.getName(), envVar.getValue());
|
||||||
|
}
|
||||||
|
esiProvider.invokeProvider(monitor, project, context, providerId, buildInfo, collector, env);
|
||||||
rc.set(true);
|
rc.set(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue