object Build
Utility methods for building code using Scala Native.
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- Build
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
build(config: Config, outpath: Path)(implicit scope: Scope): Path
Run the complete Scala Native pipeline, LLVM optimizer and system linker, producing a native binary in the end.
Run the complete Scala Native pipeline, LLVM optimizer and system linker, producing a native binary in the end.
For example, to produce a binary one needs a classpath, a working directory and a main class entry point:
val classpath: Seq[Path] = ... val workdir: Path = ... val main: String = ... val clang = Discover.clang() val clangpp = Discover.clangpp() val linkopts = Discover.linkingOptions() val compopts = Discover.compileOptions() val outpath = workdir.resolve("out") val config = Config.empty .withCompilerConfig{ NativeConfig.empty .withGC(GC.default) .withMode(Mode.default) .withClang(clang) .withClangPP(clangpp) .withLinkingOptions(linkopts) .withCompileOptions(compopts) .withLinkStubs(true) } .withMainClass(main) .withClassPath(classpath) .withWorkdir(workdir) Build.build(config, outpath)
- config
The configuration of the toolchain.
- outpath
The path to the resulting native binary.
- returns
outpath, the path to the resulting native binary.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def findAndCompileNativeSources(config: Config, linkerResult: Result): Seq[Path]
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()