/src/org/ooc/frontend/compilers/AbstractCompiler.java

http://github.com/nddrylliog/ooc · Java · 62 lines · 23 code · 21 blank · 18 comment · 0 complexity · 522147b7a12a0e4f91590324c4cd0bd1 MD5 · raw file

  1. package org.ooc.frontend.compilers;
  2. import java.io.IOException;
  3. /**
  4. * The doc is relative to gcc, since it's the compiler I'm most familiar with.
  5. *
  6. * @author Amos Wenger
  7. */
  8. public interface AbstractCompiler {
  9. public void setExecutable(String executableName);
  10. /** -o option in gcc */
  11. public void setOutputPath(String path);
  12. /** -I option in gcc */
  13. public void addIncludePath(String path);
  14. /** -L option in gcc */
  15. public void addLibraryPath(String path);
  16. /** -l option in gcc */
  17. public void addDynamicLibrary(String library);
  18. /** -c option in gcc */
  19. public void setCompileOnly();
  20. /** -g option in gcc */
  21. public void setDebugEnabled();
  22. /** .o file to link with */
  23. public void addObjectFile(String path);
  24. /** -D option in gcc */
  25. public void defineSymbol(String symbolName);
  26. /** -U option in gcc */
  27. public void undefineSymbol(String symbolName);
  28. /** multiple -arch options in gcc */
  29. public void setFatArchitectures(String[] archs);
  30. /** -isysroot /Developer/SDKs/MacOSXxxx.sdk -mmacosx-version-min=xxx in gcc */
  31. public void setOSXSDKAndDeploymentTarget(String version);
  32. /** any compiler-specific option */
  33. public void addOption(String option);
  34. /** @return the exit code of the compiler */
  35. public int launch() throws IOException, InterruptedException;
  36. public boolean supportsDeclInFor();
  37. public boolean supportsVLAs();
  38. public void reset();
  39. public String getCommandLine();
  40. public AbstractCompiler clone();
  41. }