macho linking: always -dynamic for non-static-libs

This commit is contained in:
Andrew Kelley 2019-03-14 00:07:05 -04:00
parent 862ac42a6e
commit e861da03f9
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9

View File

@ -1436,7 +1436,7 @@ static void construct_linker_job_macho(LinkJob *lj) {
bool is_lib = g->out_type == OutTypeLib;
bool is_dyn_lib = g->is_dynamic && is_lib;
if (!g->is_dynamic) {
if (is_lib && !g->is_dynamic) {
lj->args.append("-static");
} else {
lj->args.append("-dynamic");