diff options
author | Sven Gothel <[email protected]> | 2013-09-12 01:57:45 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-09-12 01:57:45 +0200 |
commit | 2cdd1070056c0f7e9dc7f40de19c2bfdfef0432a (patch) | |
tree | aacbd861bf10565505e710ce693bf2e3cbc35e3b /src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java | |
parent | 2603158cb1a0ff29f5a23de4c0ba2ce759f574cf (diff) |
Add 'clang' and 'clang++' support (compiler/linker)
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; |