Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDoug Schaefer2017-11-07 18:38:11 +0000
committerDoug Schaefer2017-11-07 18:57:03 +0000
commitffdb004e6711ddffc0174341f97dfc44d8619246 (patch)
treefd7582d6153f1f9ff4c8732d0a3f5baaeb46dbf0 /build/org.eclipse.cdt.build.gcc.core
parentb495a5faae5749e0bc117717ac2f4f41aa211d89 (diff)
downloadorg.eclipse.cdt-ffdb004e6711ddffc0174341f97dfc44d8619246.tar.gz
org.eclipse.cdt-ffdb004e6711ddffc0174341f97dfc44d8619246.tar.xz
org.eclipse.cdt-ffdb004e6711ddffc0174341f97dfc44d8619246.zip
Adjust Arduino to new GCCToolChain API and add type and id/name.
Diffstat (limited to 'build/org.eclipse.cdt.build.gcc.core')
-rw-r--r--build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/GCCToolChain.java14
1 files changed, 5 insertions, 9 deletions
diff --git a/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/GCCToolChain.java b/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/GCCToolChain.java
index bf9d5839cca..1b61d1a7b14 100644
--- a/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/GCCToolChain.java
+++ b/build/org.eclipse.cdt.build.gcc.core/src/org/eclipse/cdt/build/gcc/core/GCCToolChain.java
@@ -109,7 +109,9 @@ public class GCCToolChain extends PlatformObject implements IToolChain {
idBuilder.append(arch);
}
idBuilder.append('-');
- idBuilder.append(pathToToolChain.toString().replaceAll("\\\\", "/")); //$NON-NLS-1$ //$NON-NLS-2$
+ if (pathToToolChain != null) {
+ idBuilder.append(pathToToolChain.toString().replaceAll("\\\\", "/")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
this.id = idBuilder.toString();
properties.put(ATTR_ARCH, arch);
@@ -123,15 +125,9 @@ public class GCCToolChain extends PlatformObject implements IToolChain {
}
}
- if (pathVar == null) {
+ if (pathVar == null && this.path != null) {
// Make one with the directory containing out tool
- String name;
- // if (System.getenv("Path") != null) { //$NON-NLS-1$
- // name = "Path"; //$NON-NLS-1$
- // } else {
- name = "PATH"; //$NON-NLS-1$
- // }
- pathVar = new EnvironmentVariable(name, this.path.getParent().toString(),
+ pathVar = new EnvironmentVariable("PATH", this.path.getParent().toString(), //$NON-NLS-1$
IEnvironmentVariable.ENVVAR_PREPEND, File.pathSeparator);
if (envVars == null) {
envVars = new IEnvironmentVariable[] { pathVar };

Back to the top