Interop: support passing linker as arg to stub generator
This commit is contained in:
@@ -26,6 +26,7 @@ class NamedNativeInteropConfig extends AbstractFileCollection implements Named {
|
||||
|
||||
private List<String> compilerOpts = []
|
||||
private FileCollection headers;
|
||||
private String linker
|
||||
private List<String> linkerOpts = []
|
||||
private FileCollection linkFiles;
|
||||
private List<String> linkTasks = []
|
||||
@@ -48,6 +49,10 @@ class NamedNativeInteropConfig extends AbstractFileCollection implements Named {
|
||||
headers = headers + files
|
||||
}
|
||||
|
||||
void linker(String value) {
|
||||
linker = value
|
||||
}
|
||||
|
||||
void linkerOpts(String... values) {
|
||||
linkerOpts.addAll(values)
|
||||
}
|
||||
@@ -161,6 +166,10 @@ class NamedNativeInteropConfig extends AbstractFileCollection implements Named {
|
||||
args "-pkg:" + pkg
|
||||
}
|
||||
|
||||
if (linker != null) {
|
||||
args "-linker:" + linker
|
||||
}
|
||||
|
||||
args compilerOpts.collect { "-copt:$it" }
|
||||
args linkerOpts.collect { "-lopt:$it" }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user