Exemplo n.º 1
0
    private <T extends BinaryToolSpec> CommandLineTool<T> commandLineTool(
        String toolName, File exe) {
      CommandLineTool<T> tool = new CommandLineTool<T>(toolName, exe, execActionFactory);

      // The visual C++ tools use the path to find other executables
      tool.withPath(
          install.getVisualCppBin(targetPlatform),
          sdk.getBinDir(targetPlatform),
          install.getCommonIdeBin());

      return tool;
    }
Exemplo n.º 2
0
 public <T extends BinaryToolSpec> Compiler<T> createCCompiler() {
   CommandLineTool<CCompileSpec> commandLineTool =
       commandLineTool("C compiler", install.getCompiler(targetPlatform));
   Transformer<CCompileSpec, CCompileSpec> specTransformer = addIncludePath();
   commandLineTool.withSpecTransformer(specTransformer);
   CCompiler cCompiler = new CCompiler(commandLineTool);
   return (Compiler<T>) new OutputCleaningCompiler<CCompileSpec>(cCompiler, ".obj");
 }
Exemplo n.º 3
0
 public <T extends StaticLibraryArchiverSpec> Compiler<T> createStaticLibraryArchiver() {
   CommandLineTool<StaticLibraryArchiverSpec> commandLineTool =
       commandLineTool("Static library archiver", install.getStaticLibArchiver(targetPlatform));
   return (Compiler<T>) new LibExeStaticLibraryArchiver(commandLineTool);
 }
Exemplo n.º 4
0
 public <T extends LinkerSpec> Compiler<T> createLinker() {
   CommandLineTool<LinkerSpec> commandLineTool =
       commandLineTool("Linker", install.getLinker(targetPlatform));
   commandLineTool.withSpecTransformer(addLibraryPath());
   return (Compiler<T>) new LinkExeLinker(commandLineTool);
 }
Exemplo n.º 5
0
 public <T extends BinaryToolSpec> Compiler<T> createAssembler() {
   CommandLineTool<AssembleSpec> commandLineTool =
       commandLineTool("Assembler", install.getAssembler(targetPlatform));
   return (Compiler<T>) new Assembler(commandLineTool);
 }