Examples of Linker


Examples of com.github.maven_nar.cpptasks.compiler.Linker

        }
        return null;
    }

    public Processor getProcessor() {
        Linker linker = (Linker) super.getProcessor();
        if (linker == null) {
            linker = GccLinker.getInstance();
        }
        if (getLibtool() && linker instanceof CommandLineLinker) {
            CommandLineLinker cmdLineLinker = (CommandLineLinker) linker;
View Full Code Here

Examples of com.github.maven_nar.cpptasks.compiler.Linker

     */
    public void setName(LinkerEnum name) throws BuildException {
        if (isReference()) {
            throw tooManyAttributes();
        }
        Linker linker = name.getLinker();
        super.setProcessor(linker);
    }
View Full Code Here

Examples of com.github.maven_nar.cpptasks.compiler.Linker

        }
        Linker linker = name.getLinker();
        super.setProcessor(linker);
    }
    protected void setProcessor(Processor proc) throws BuildException {
        Linker linker = null;
        if (proc instanceof Linker) {
            linker = (Linker) proc;
        } else {
            LinkType linkType = new LinkType();
            linker = proc.getLinker(linkType);
View Full Code Here

Examples of com.github.maven_nar.cpptasks.compiler.Linker

   * results in the singleton GCC linker.
   */
  public void testGetGcc() {
    LinkerDef linkerDef = (LinkerDef) create();
    linkerDef.setClassname("com.github.maven_nar.cpptasks.gcc.GccLinker");
    Linker comp = (Linker) linkerDef.getProcessor();
    assertNotNull(comp);
    assertSame(GccLinker.getInstance(), comp);
  }
View Full Code Here

Examples of com.github.maven_nar.cpptasks.compiler.Linker

   */
  public void testGetMSVC() {
    LinkerDef linkerDef = (LinkerDef) create();
    linkerDef
        .setClassname("com.github.maven_nar.cpptasks.devstudio.DevStudioLinker");
    Linker comp = (Linker) linkerDef.getProcessor();
    assertNotNull(comp);
    assertSame(DevStudioLinker.getInstance(), comp);
  }
View Full Code Here

Examples of com.github.maven_nar.cpptasks.compiler.Linker

   * expect one matching file.
   *
   * @throws IOException if unable to create or delete temporary file
   */
  public final void testLinkerVisitFiles() throws IOException {
    Linker linker = DevStudioLinker.getInstance();
    testVisitFiles(linker, 1);
  }
View Full Code Here

Examples of com.github.maven_nar.cpptasks.compiler.Linker

   * expect one matching file.
   *
   * @throws IOException if unable to create or delete temporary file
   */
  public final void testLibrarianVisitFiles() throws IOException {
    Linker linker = DevStudioLibrarian.getInstance();
    testVisitFiles(linker, 0);
  }
View Full Code Here

Examples of com.google.gwt.core.ext.Linker

      }
    }
    if (developmentMode) {
      // BACKWARDS COMPATIBILITY: many linkers currently fail in dev mode.
      try {
        Linker l = module.getActivePrimaryLinker().newInstance();
        StandardLinkerContext context =
          new StandardLinkerContext(getTopLogger(), module, null);
        if (!l.supportsDevModeInJunit(context)) {
          if (module.getLinker("std") != null) {
            // TODO: unfortunately, this could be race condition between dev/prod
            module.addLinker("std");
          }
        }
View Full Code Here

Examples of com.google.gwt.core.ext.Linker

    EnumSet<Order> phasePre = EnumSet.of(Order.PRE, Order.PRIMARY);
    EnumSet<Order> phasePost = EnumSet.of(Order.POST);

    // Instantiate instances of the Linkers
    for (Class<? extends Linker> clazz : linkerClasses) {
      Linker linker;

      // Create an instance of the Linker
      try {
        linker = clazz.newInstance();
        linkerStack.push(linker);
      } catch (InstantiationException e) {
        logger.log(TreeLogger.ERROR, "Unable to create LinkerContextShim", e);
        throw new UnableToCompleteException();
      } catch (IllegalAccessException e) {
        logger.log(TreeLogger.ERROR, "Unable to create LinkerContextShim", e);
        throw new UnableToCompleteException();
      }

      // Detemine if we need to invoke the Linker in the current link phase
      Order order = clazz.getAnnotation(LinkerOrder.class).value();
      if (!phasePre.contains(order)) {
        continue;
      }

      // The primary Linker is guaranteed to be last in the order
      if (order == Order.PRIMARY) {
        assert linkerClasses.get(linkerClasses.size() - 1).equals(clazz);
      }

      TreeLogger linkerLogger = logger.branch(TreeLogger.TRACE,
          "Invoking Linker " + linker.getDescription(), null);

      workingArtifacts.freeze();
      try {
        workingArtifacts = linker.link(linkerLogger, this, workingArtifacts);
      } catch (Exception e) {
        linkerLogger.log(TreeLogger.ERROR, "Failed to link", e);
        throw new UnableToCompleteException();
      }
    }

    // Pop the primary linker off of the stack
    linkerStack.pop();

    // Unwind the stack
    while (!linkerStack.isEmpty()) {
      Linker linker = linkerStack.pop();
      Class<? extends Linker> linkerType = linker.getClass();

      // See if the Linker should be run in the current phase
      Order order = linkerType.getAnnotation(LinkerOrder.class).value();
      if (phasePost.contains(order)) {
        TreeLogger linkerLogger = logger.branch(TreeLogger.TRACE,
            "Invoking Linker " + linker.getDescription(), null);

        workingArtifacts.freeze();
        try {
          workingArtifacts = linker.link(linkerLogger, this, workingArtifacts);
        } catch (Exception e) {
          linkerLogger.log(TreeLogger.ERROR, "Failed to link", e);
          throw new UnableToCompleteException();
        }
      }
View Full Code Here

Examples of com.google.gwt.core.ext.Linker

      }
    }
    if (developmentMode) {
      // BACKWARDS COMPATIBILITY: many linkers currently fail in dev mode.
      try {
        Linker l = module.getActivePrimaryLinker().newInstance();
        StandardLinkerContext context = new StandardLinkerContext(getTopLogger(), module, null);
        //if (!l.supportsDevModeInJunit(context)) {
        if (module.getLinker("std") != null) {
          // TODO: unfortunately, this could be race condition between dev/prod
          module.addLinker("std");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.