From feccee87a78e68d575dbdf44b34ca0cb5a21ea8d Mon Sep 17 00:00:00 2001 From: lhauch Date: Thu, 5 Oct 2006 23:12:07 +0000 Subject: Restructuring for better separation of Tool packages. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1674 6f19259b-4bc3-4df7-8a09-765794883524 --- .../cpptasks/intel/IntelLinux32CCompiler.java | 58 +++++++++++++++++++ .../cpptasks/intel/IntelLinux32Linker.java | 55 ++++++++++++++++++ .../cpptasks/intel/IntelLinux64CCompiler.java | 58 +++++++++++++++++++ .../cpptasks/intel/IntelLinux64Linker.java | 55 ++++++++++++++++++ .../antcontrib/cpptasks/intel/IntelProcessor.java | 51 +++++++++++++++++ .../cpptasks/intel/IntelWin32Aslcompiler.java | 66 ++++++++++++++++++++++ .../cpptasks/intel/IntelWin32CCompiler.java | 53 +++++++++++++++++ .../cpptasks/intel/IntelWin32Librarian.java | 38 +++++++++++++ .../cpptasks/intel/IntelWin32Linker.java | 46 +++++++++++++++ .../cpptasks/intel/IntelWin64CCompiler.java | 53 +++++++++++++++++ 10 files changed, 533 insertions(+) create mode 100644 Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux32CCompiler.java create mode 100644 Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux32Linker.java create mode 100644 Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux64CCompiler.java create mode 100644 Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux64Linker.java create mode 100644 Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelProcessor.java create mode 100644 Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin32Aslcompiler.java create mode 100644 Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin32CCompiler.java create mode 100644 Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin32Librarian.java create mode 100644 Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin32Linker.java create mode 100644 Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin64CCompiler.java (limited to 'Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel') diff --git a/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux32CCompiler.java b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux32CCompiler.java new file mode 100644 index 0000000000..65402f41fb --- /dev/null +++ b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux32CCompiler.java @@ -0,0 +1,58 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.compiler.Processor; +import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler; + +import org.apache.tools.ant.types.Environment; +/** + * Adapter for the Intel (r) C/C++ compiler for IA-32 Linux (r) + * + * The Intel (r) C/C++ compiler for IA32 Linux mimics the command options for + * gcc compiler. + * + * @author Curt Arnold + */ +public final class IntelLinux32CCompiler extends GccCompatibleCCompiler { + private static final IntelLinux32CCompiler instance = new IntelLinux32CCompiler( + false, new IntelLinux32CCompiler(true, null, false, null), false, + null); + public static IntelLinux32CCompiler getInstance() { + return instance; + } + private IntelLinux32CCompiler(boolean isLibtool, + IntelLinux32CCompiler libtoolCompiler, boolean newEnvironment, + Environment env) { + super("icc", "-V", isLibtool, libtoolCompiler, newEnvironment, env); + } + public Processor changeEnvironment(boolean newEnvironment, Environment env) { + if (newEnvironment || env != null) { + return new IntelLinux32CCompiler(getLibtool(), + (IntelLinux32CCompiler) getLibtoolCompiler(), + newEnvironment, env); + } + return this; + } + public Linker getLinker(LinkType type) { + return IntelLinux32Linker.getInstance().getLinker(type); + } + public int getMaximumCommandLength() { + return Integer.MAX_VALUE; + } +} diff --git a/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux32Linker.java b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux32Linker.java new file mode 100644 index 0000000000..268f490ff3 --- /dev/null +++ b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux32Linker.java @@ -0,0 +1,55 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker; +import net.sf.antcontrib.cpptasks.gcc.GccLibrarian; +/** + * Adapter for the Intel (r) Linker for Linux (r) for IA-32 + * + * @author Curt Arnold + */ +public final class IntelLinux32Linker extends AbstractLdLinker { + private static final String[] discardFiles = new String[0]; + private static final String[] libtoolObjFiles = new String[]{".fo", ".a", + ".lib", ".dll", ".so", ".sl"}; + private static final String[] objFiles = new String[]{".o", ".a", ".lib", + ".dll", ".so", ".sl"}; + private static final IntelLinux32Linker dllLinker = new IntelLinux32Linker( + "lib", ".so", false, new IntelLinux32Linker("lib", ".so", true, + null)); + private static final IntelLinux32Linker instance = new IntelLinux32Linker( + "", "", false, null); + public static IntelLinux32Linker getInstance() { + return instance; + } + private IntelLinux32Linker(String outputPrefix, String outputSuffix, + boolean isLibtool, IntelLinux32Linker libtoolLinker) { + super("icc", "-V", objFiles, discardFiles, outputPrefix, outputSuffix, + isLibtool, libtoolLinker); + } + public Linker getLinker(LinkType type) { + if (type.isStaticLibrary()) { + return GccLibrarian.getInstance(); + } + if (type.isSharedLibrary()) { + return dllLinker; + } + return instance; + } +} diff --git a/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux64CCompiler.java b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux64CCompiler.java new file mode 100644 index 0000000000..5a506e0d85 --- /dev/null +++ b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux64CCompiler.java @@ -0,0 +1,58 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.compiler.Processor; +import net.sf.antcontrib.cpptasks.gcc.GccCompatibleCCompiler; + +import org.apache.tools.ant.types.Environment; +/** + * Adapter for the Intel (r) C/C++ compiler for IA-64 Linux (r) + * + * The Intel C/C++ compiler for IA-64 Linux mimics the command options for gcc + * compiler. + * + * @author Curt Arnold + */ +public final class IntelLinux64CCompiler extends GccCompatibleCCompiler { + private static final IntelLinux64CCompiler instance = new IntelLinux64CCompiler( + false, new IntelLinux64CCompiler(true, null, false, null), false, + null); + public static IntelLinux64CCompiler getInstance() { + return instance; + } + private IntelLinux64CCompiler(boolean isLibtool, + IntelLinux64CCompiler libtoolCompiler, boolean newEnvironment, + Environment env) { + super("ecc", "-V", isLibtool, libtoolCompiler, newEnvironment, env); + } + public Processor changeEnvironment(boolean newEnvironment, Environment env) { + if (newEnvironment || env != null) { + return new IntelLinux64CCompiler(getLibtool(), + (IntelLinux64CCompiler) this.getLibtoolCompiler(), + newEnvironment, env); + } + return this; + } + public Linker getLinker(LinkType type) { + return IntelLinux64Linker.getInstance().getLinker(type); + } + public int getMaximumCommandLength() { + return Integer.MAX_VALUE; + } +} diff --git a/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux64Linker.java b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux64Linker.java new file mode 100644 index 0000000000..f381403510 --- /dev/null +++ b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelLinux64Linker.java @@ -0,0 +1,55 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.gcc.AbstractLdLinker; +import net.sf.antcontrib.cpptasks.gcc.GccLibrarian; +/** + * Adapter for the Intel (r) linker for Linux for IA-64 + * + * @author Curt Arnold + */ +public final class IntelLinux64Linker extends AbstractLdLinker { + private static final String[] discardFiles = new String[0]; + private static final String[] libtoolObjFiles = new String[]{".fo", ".a", + ".lib", ".dll", ".so", ".sl"}; + private static final String[] objFiles = new String[]{".o", ".a", ".lib", + ".dll", ".so", ".sl"}; + private static final IntelLinux64Linker dllLinker = new IntelLinux64Linker( + "lib", ".so", false, new IntelLinux64Linker("lib", ".so", true, + null)); + private static final IntelLinux64Linker instance = new IntelLinux64Linker( + "", "", false, null); + public static IntelLinux64Linker getInstance() { + return instance; + } + private IntelLinux64Linker(String outputPrefix, String outputSuffix, + boolean isLibtool, IntelLinux64Linker libtoolLinker) { + super("ecc", "-V", objFiles, discardFiles, outputPrefix, outputSuffix, + isLibtool, libtoolLinker); + } + public Linker getLinker(LinkType type) { + if (type.isStaticLibrary()) { + return GccLibrarian.getInstance(); + } + if (type.isSharedLibrary()) { + return dllLinker; + } + return instance; + } +} diff --git a/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelProcessor.java b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelProcessor.java new file mode 100644 index 0000000000..d1b4eafec5 --- /dev/null +++ b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelProcessor.java @@ -0,0 +1,51 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import java.util.Vector; + +import net.sf.antcontrib.cpptasks.devstudio.DevStudioProcessor; +/** + * A add-in class for Intel (r) compilers and linkers + * + * + */ +public class IntelProcessor { + public static void addWarningSwitch(Vector args, int level) { + DevStudioProcessor.addWarningSwitch(args, level); + } + public static String getCommandFileSwitch(String cmdFile) { + return DevStudioProcessor.getCommandFileSwitch(cmdFile); + } + public static void getDefineSwitch(StringBuffer buffer, String define, + String value) { + DevStudioProcessor.getDefineSwitch(buffer, define, value); + } + public static String getIncludeDirSwitch(String includeDir) { + return DevStudioProcessor.getIncludeDirSwitch(includeDir); + } + public static String[] getOutputFileSwitch(String outPath) { + return DevStudioProcessor.getOutputFileSwitch(outPath); + } + public static void getUndefineSwitch(StringBuffer buffer, String define) { + DevStudioProcessor.getUndefineSwitch(buffer, define); + } + public static boolean isCaseSensitive() { + return false; + } + private IntelProcessor() { + } +} diff --git a/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin32Aslcompiler.java b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin32Aslcompiler.java new file mode 100644 index 0000000000..5255cb90ce --- /dev/null +++ b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin32Aslcompiler.java @@ -0,0 +1,66 @@ +/* + * + * Copyright 2001-2005 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; + +import java.util.Vector; + +import net.sf.antcontrib.cpptasks.compiler.CommandLineAslcompiler; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.devstudio.DevStudioLinker; +/** + * Adapter for Intel ASL compiler + * + */ +public final class IntelWin32Aslcompiler extends CommandLineAslcompiler{ + private final static String[] sourceExtensions = new String[]{".asl"}; + private final static String[] headerExtensions = new String[]{}; + private final static String[] defaultflags = new String[]{}; + private static final IntelWin32Aslcompiler instance = new IntelWin32Aslcompiler("iasl", + sourceExtensions, headerExtensions, false); + + /** + * Gets gcc adapter + */ + public static IntelWin32Aslcompiler getInstance() { + return instance; + } + + /** + * Private constructor. Use GccAssembler.getInstance() to get singleton + * instance of this class. + */ + private IntelWin32Aslcompiler(String command, String[] sourceExtensions, + String[] headerExtensions, boolean isLibtool){ + super(command, null, sourceExtensions, headerExtensions, + ".aml"); + } + public void addImpliedArgs(Vector args, boolean debug, + Boolean defaultflag){ + if (defaultflag != null && defaultflag.booleanValue()) { + for (int i = 0; i < defaultflags.length; i++) { + args.addElement(defaultflags[i]); + } + } + } + public int getMaximumCommandLength() { + return Integer.MAX_VALUE; + } + public Linker getLinker(LinkType linkType) { + return DevStudioLinker.getInstance().getLinker(linkType); + } +} \ No newline at end of file diff --git a/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin32CCompiler.java b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin32CCompiler.java new file mode 100644 index 0000000000..7aef79999f --- /dev/null +++ b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin32CCompiler.java @@ -0,0 +1,53 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.compiler.Processor; +import net.sf.antcontrib.cpptasks.devstudio.DevStudioCompatibleCCompiler; + +import org.apache.tools.ant.types.Environment; +/** + * Adapter for the Intel (r) C++ compiler for 32-bit applications + * + * The Intel (r) C++ compiler for IA32 Windows mimics the command options for + * the Microsoft (r) C++ compiler. + * + * @author Curt Arnold + */ +public final class IntelWin32CCompiler extends DevStudioCompatibleCCompiler { + private static final IntelWin32CCompiler instance = new IntelWin32CCompiler( + false, null); + public static IntelWin32CCompiler getInstance() { + return instance; + } + private IntelWin32CCompiler(boolean newEnvironment, Environment env) { + super("icl", null, newEnvironment, env); + } + public Processor changeEnvironment(boolean newEnvironment, Environment env) { + if (newEnvironment || env != null) { + return new IntelWin32CCompiler(newEnvironment, env); + } + return this; + } + public Linker getLinker(LinkType type) { + return IntelWin32Linker.getInstance().getLinker(type); + } + public int getMaximumCommandLength() { + return 1024; + } +} diff --git a/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin32Librarian.java b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin32Librarian.java new file mode 100644 index 0000000000..e83da1ce0b --- /dev/null +++ b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin32Librarian.java @@ -0,0 +1,38 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.devstudio.DevStudioCompatibleLibrarian; +/** + * Adapter for the xilib from the Intel(r) C++ Compiler for IA-32 or IA-64 + * systems running Microsoft (r) operating systems + * + * @author Curt Arnold + */ +public class IntelWin32Librarian extends DevStudioCompatibleLibrarian { + private static final IntelWin32Librarian instance = new IntelWin32Librarian(); + public static IntelWin32Librarian getInstance() { + return instance; + } + protected IntelWin32Librarian() { + super("xilib", "/bogus"); + } + public Linker getLinker(LinkType type) { + return IntelWin32Linker.getInstance().getLinker(type); + } +} diff --git a/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin32Linker.java b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin32Linker.java new file mode 100644 index 0000000000..51258e23ca --- /dev/null +++ b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin32Linker.java @@ -0,0 +1,46 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.devstudio.DevStudioCompatibleLinker; +/** + * Adapter for the Intel (r) linker for 32-bit applications + * + * @author Curt Arnold + */ +public final class IntelWin32Linker extends DevStudioCompatibleLinker { + private static final IntelWin32Linker dllLinker = new IntelWin32Linker( + ".dll"); + private static final IntelWin32Linker instance = new IntelWin32Linker( + ".exe"); + public static IntelWin32Linker getInstance() { + return instance; + } + private IntelWin32Linker(String outputSuffix) { + super("xilink", "/bogus", outputSuffix); + } + public Linker getLinker(LinkType type) { + if (type.isStaticLibrary()) { + return IntelWin32Librarian.getInstance(); + } + if (type.isSharedLibrary()) { + return dllLinker; + } + return instance; + } +} diff --git a/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin64CCompiler.java b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin64CCompiler.java new file mode 100644 index 0000000000..9b8d2c9db4 --- /dev/null +++ b/Tools/Java/Source/Cpptasks/net/sf/antcontrib/cpptasks/intel/IntelWin64CCompiler.java @@ -0,0 +1,53 @@ +/* + * + * Copyright 2002-2004 The Ant-Contrib project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package net.sf.antcontrib.cpptasks.intel; +import net.sf.antcontrib.cpptasks.compiler.LinkType; +import net.sf.antcontrib.cpptasks.compiler.Linker; +import net.sf.antcontrib.cpptasks.compiler.Processor; +import net.sf.antcontrib.cpptasks.devstudio.DevStudioCompatibleCCompiler; + +import org.apache.tools.ant.types.Environment; +/** + * Adapter for the Intel C++ compiler for Itanium(TM) Applications + * + * @author Curt Arnold + */ +public final class IntelWin64CCompiler extends DevStudioCompatibleCCompiler { + private static final IntelWin64CCompiler instance = new IntelWin64CCompiler( + false, null); + public static IntelWin64CCompiler getInstance() { + return instance; + } + private IntelWin64CCompiler(boolean newEnvironment, Environment env) { + super("ecl", null, newEnvironment, env); + } + public Processor changeEnvironment(boolean newEnvironment, Environment env) { + if (newEnvironment || env != null) { + return new IntelWin64CCompiler(newEnvironment, env); + } + return this; + } + public Linker getLinker(LinkType type) { + // + // currently the Intel Win32 and Win64 linkers + // are command line equivalent + return IntelWin32Linker.getInstance().getLinker(type); + } + public int getMaximumCommandLength() { + return 1024; + } +} -- cgit v1.2.3