Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorDoug Schaefer2017-11-20 18:28:22 +0000
committerDoug Schaefer2017-11-20 18:28:22 +0000
commitdc4be72b1ae13020fcbd8dbb46f8c6f9b9eb973b (patch)
tree05e0cd9927d9179fd510a4312b0226a5415d6ad7 /build
parentaedf6d8fa96c55c4e9fded7dba3c158a6493586f (diff)
downloadorg.eclipse.cdt-dc4be72b1ae13020fcbd8dbb46f8c6f9b9eb973b.tar.gz
org.eclipse.cdt-dc4be72b1ae13020fcbd8dbb46f8c6f9b9eb973b.tar.xz
org.eclipse.cdt-dc4be72b1ae13020fcbd8dbb46f8c6f9b9eb973b.zip
Fix MSYS2 so that it's provider overrides the path provider.
Also handle case when launchMode is null when creating a build config. Change-Id: Ie70de785168c2e24c842d517c64a297ba44e24f4
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/internal/GCCPathToolChainProvider.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/internal/GCCPathToolChainProvider.java b/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/internal/GCCPathToolChainProvider.java
index cc2d84069a6..dae4f2df0d5 100644
--- a/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/internal/GCCPathToolChainProvider.java
+++ b/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/internal/GCCPathToolChainProvider.java
@@ -15,9 +15,11 @@ import java.util.regex.Pattern;
import org.eclipse.cdt.build.gcc.core.ClangToolChain;
import org.eclipse.cdt.build.gcc.core.GCCToolChain;
import org.eclipse.cdt.build.gcc.core.GCCToolChain.GCCInfo;
+import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.build.IToolChain;
import org.eclipse.cdt.core.build.IToolChainManager;
import org.eclipse.cdt.core.build.IToolChainProvider;
+import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Platform;
/**
@@ -66,7 +68,14 @@ public class GCCPathToolChainProvider implements IToolChainProvider {
gcc.setProperty(IToolChain.ATTR_OS, Platform.OS_MACOSX);
break;
}
- manager.addToolChain(gcc);
+ try {
+ if (manager.getToolChain(gcc.getTypeId(), gcc.getId()) == null) {
+ // Only add if another provider hasn't already added it
+ manager.addToolChain(gcc);
+ }
+ } catch (CoreException e) {
+ CCorePlugin.log(e.getStatus());
+ }
}
}
} catch (IOException e) {

Back to the top