diff options
Diffstat (limited to 'src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java')
-rw-r--r-- | src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java b/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java index ba88d46..fb831e1 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java @@ -33,7 +33,7 @@ import net.sf.antcontrib.cpptasks.OptimizationEnum; /** * Adapter for the GCC C/C++ compiler * - * @author Adam Murdoch + * @author Adam Murdoch, et.al. */ public final class GccCCompiler extends GccCompatibleCCompiler { private final static String[] sourceExtensions = new String[]{".c", /* C */ @@ -67,6 +67,14 @@ public final class GccCCompiler extends GccCompatibleCCompiler { sourceExtensions, headerExtensions, false, new GccCCompiler("gcc", sourceExtensions, headerExtensions, true, null, false, null), false, null); + private static final GccCCompiler clangInstance = new GccCCompiler("clang", + sourceExtensions, headerExtensions, false, + new GccCCompiler("clang", sourceExtensions, headerExtensions, true, + null, false, null), false, null); + private static final GccCCompiler cpplangInstance = new GccCCompiler("clang++", + sourceExtensions, headerExtensions, false, + new GccCCompiler("clang++", sourceExtensions, headerExtensions, true, + null, false, null), false, null); /** * Gets c++ adapter */ @@ -91,6 +99,18 @@ public final class GccCCompiler extends GccCompatibleCCompiler { public static GccCCompiler getInstance() { return instance; } + /** + * Gets clang adapter + */ + public static GccCCompiler getCLangInstance() { + return clangInstance; + } + /** + * Gets clang++ adapter + */ + public static GccCCompiler getCPPLangInstance() { + return cpplangInstance; + } private String identifier; private File[] includePath; private boolean isPICMeaningful = true; |