Jacek Caban (@jacek) commented about tools/winegcc/winegcc.c:
if (opts->debug_file && strendswith(opts->debug_file, ".pdb")) strarray_add(&link_args, strmake("-Wl,--pdb=%s", opts->debug_file));
if (opts->build_id)
strarray_add( &link_args, "-Wl,--build-id");
This looks good, but we should probably add for generic Unix case too.