diff options
Diffstat (limited to 'src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java')
-rw-r--r-- | src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java b/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java index 3ee7f8e..f264cd9 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java @@ -59,24 +59,21 @@ public abstract class AbstractLdLinker extends CommandLineLinker { args.addElement("-g"); } if (isDarwin()) { - if (linkType.isPluginModule()) { + if (linkType.isStaticRuntime() || linkType.isStaticLibrary()) { + args.addElement("-static"); + } else if (linkType.isPluginModule()) { args.addElement("-bundle"); - } else { - if (linkType.isSharedLibrary()) { - // args.addElement("-prebind"); // Only required for OSX 10.3 and earlier, no auto-add (can add manually though) - args.addElement("-dynamiclib"); - } + } else if (linkType.isSharedLibrary()) { + // args.addElement("-prebind"); // Only required for OSX 10.3 and earlier, no auto-add (can add manually though) + args.addElement("-dynamic"); } } else { - if (linkType.isStaticRuntime()) { + if (linkType.isStaticRuntime() || linkType.isStaticLibrary()) { args.addElement("-static"); - } - if (linkType.isPluginModule()) { + } else if (linkType.isPluginModule()) { + args.addElement("-shared"); + } else if (linkType.isSharedLibrary()) { args.addElement("-shared"); - } else { - if (linkType.isSharedLibrary()) { - args.addElement("-shared"); - } } } } |