Auto link everything found in dist/klib.
Disable such behavior with -nodefaultlibs. Omit libraries from the link stage if their packages have not been referenced.
This commit is contained in:
committed by
alexander-gorshenev
parent
5d79c079b4
commit
27f7e4263b
@@ -78,6 +78,7 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
|
||||
with(KonanConfigKeys) {
|
||||
with(configuration) {
|
||||
|
||||
put(NODEFAULTLIBS, arguments.nodefaultlibs)
|
||||
put(NOSTDLIB, arguments.nostdlib)
|
||||
put(NOPACK, arguments.nopack)
|
||||
put(NOMAIN, arguments.nomain)
|
||||
|
||||
@@ -48,6 +48,9 @@ class K2NativeCompilerArguments : CommonCompilerArguments() {
|
||||
@Argument(value = "-nativelibrary", shortName = "-nl", valueDescription = "<path>", description = "Include the native bitcode library")
|
||||
var nativeLibraries: Array<String>? = null
|
||||
|
||||
@Argument(value = "-nodefaultlibs", description = "Don't link the libraries from dist/klib automatically")
|
||||
var nodefaultlibs: Boolean = false
|
||||
|
||||
@Argument(value = "-nomain", description = "Assume 'main' entry point to be provided by external libraries")
|
||||
var nomain: Boolean = false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user