build/tests: implement passing interop linker args to compiler
This commit is contained in:
committed by
SvyatoslavScherbina
parent
7ad36ac035
commit
725e367614
@@ -202,7 +202,12 @@ class RunInteropKonanTest extends KonanTest {
|
||||
|
||||
String interopStubsBc = new File(interopConf.nativeLibsDir, interop + "stubs.bc").absolutePath
|
||||
|
||||
runCompiler(filesToCompile, exe, ["-library", interopBc, "-nativelibrary", interopStubsBc])
|
||||
List<String> linkerArguments = interopConf.linkerOpts // TODO: add arguments from .def file
|
||||
|
||||
List<String> compilerArguments = ["-library", interopBc, "-nativelibrary", interopStubsBc] +
|
||||
linkerArguments.collectMany { ["-linkerArg", it] }
|
||||
|
||||
runCompiler(filesToCompile, exe, compilerArguments)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ class NamedNativeInteropConfig implements Named {
|
||||
private List<String> compilerOpts = []
|
||||
private List<String> headers;
|
||||
private String linker
|
||||
private List<String> linkerOpts = []
|
||||
List<String> linkerOpts = []
|
||||
private FileCollection linkFiles;
|
||||
private List<String> linkTasks = []
|
||||
|
||||
@@ -177,6 +177,8 @@ class NamedNativeInteropConfig implements Named {
|
||||
|
||||
// defer as much as possible
|
||||
doFirst {
|
||||
List<String> linkerOpts = this.linkerOpts
|
||||
|
||||
linkTasks.each {
|
||||
linkerOpts += project.tasks.getByPath(it).outputs.files.files
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user