backend: implement '-linkerArg' to pass arguments to the linker

This commit is contained in:
Svyatoslav Scherbina
2017-03-09 15:45:45 +07:00
committed by SvyatoslavScherbina
parent 46fde200be
commit 7ad36ac035
4 changed files with 11 additions and 1 deletions
@@ -60,6 +60,8 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
put(LIBRARY_FILES,
arguments.libraries.toNonNullList())
put(LINKER_ARGS, arguments.linkerArguments.toNonNullList())
put(NATIVE_LIBRARY_FILES,
arguments.nativeLibraries.toNonNullList())
@@ -28,6 +28,10 @@ public class K2NativeCompilerArguments extends CommonCompilerArguments {
@Argument(value = "nolink", description = "Don't link, just produce a bitcode file")
public boolean nolink;
@Argument(value = "linkerArg", description = "Add argument to linker")
@ValueDescription("<arg>")
public String[] linkerArguments;
@Argument(value = "nostdlib", description = "Don't link with stdlib")
public boolean nostdlib;