Hi Kevin,
On 20.11.2020 18:28, Kevin Puetz wrote:
- if(opts->out_implib)
- {
if (!spec_file)
error("--out-implib requires a .spec or .def file\n");
implib_args = get_winebuild_args( opts );
if ((tool = build_tool_name( opts, TOOL_CC ))) strarray_add( implib_args, strmake( "--cc-cmd=%s", strarray_tostring( tool, " " )));
if ((tool = build_tool_name( opts, TOOL_LD ))) strarray_add( implib_args, strmake( "--ld-cmd=%s", strarray_tostring( tool, " " )));
strarray_add(implib_args, "--implib");
strarray_add(implib_args, "-o");
strarray_add(implib_args, opts->out_implib);
strarray_add(implib_args, "--export");
strarray_add(implib_args, spec_file);
strarray_addall(implib_args, opts->winebuild_args);
spawn(opts->prefix, implib_args, 0);
strarray_free (implib_args);
- }
I think that we still want linker to take care of import lib on windows targets (mostly mingw). Linker can do better job than winebuild (by supporting dllexport attributes, for example).
Also, ideally, we'd take care of removing that import library on error. See output_debug_file for an example.
Thanks,
Jacek