blob: ee77feb4f4b0401aa7699ec2b0cb65bfa0c64e92 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
/*******************************************************************************
* Copyright (c) 2010-2013 Nokia Siemens Networks Oyj, Finland.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Nokia Siemens Networks - initial implementation
* Leo Hippelainen - Initial implementation
*******************************************************************************/
package org.eclipse.cdt.managedbuilder.llvm.ui;
import org.eclipse.cdt.managedbuilder.core.IManagedIsToolChainSupported;
import org.eclipse.cdt.managedbuilder.core.IToolChain;
import org.osgi.framework.Version;
/**
* Based on MingwIsToolChainSupported.
*
*/
public class LlvmIsToolChainSupported implements IManagedIsToolChainSupported {
private final boolean supported;
/**
* Constructor.
* LLVM Toolchain is supported if binary path for LLVM Tools can be found.
*/
public LlvmIsToolChainSupported() {
// Only supported if we can find the llvm tools.
this.supported = LlvmEnvironmentVariableSupplier.getBinPath() != null;
}
/* (non-Javadoc)
* @see org.eclipse.cdt.managedbuilder.core.IManagedIsToolChainSupported#isSupported(org.eclipse.cdt.managedbuilder.core.IToolChain,
* org.osgi.framework.Version, java.lang.String)
*/
/**
* Return a boolean value that informs if the LLVM Toolchain is supported.
*/
@Override
public boolean isSupported(IToolChain toolChain,
/*
* Version is supported from CDT 7.1.0.
* Use org.osgi.framework.PluginVersionIdentifier with older CDT versions.
*/
Version version, String instance) {
return this.supported;
}
}
|