diff options
author | Sven Gothel <[email protected]> | 2023-01-23 10:01:35 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2023-01-23 10:01:35 +0100 |
commit | 3189c3b1ee0080d219487360cef204bd5f458ecd (patch) | |
tree | fbc2dff774c69038d5792272188eb9efff223f51 /src/main/java | |
parent | 2bdb8fea6470935244b16569c1febc7f366ac367 (diff) |
GccLinker.dll[Clang]Linker: Support Windows hosts w/ NAME.dll target (default is libNAME.so)
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java b/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java index f9c51ef..e205102 100644 --- a/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java +++ b/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java @@ -47,6 +47,11 @@ public class GccLinker extends GnuLinker { private static final GccLinker dllClangLinker = new GccLinker("clang", objFiles, discardFiles, "lib", ".so", false, new GccLinker("clang", objFiles, discardFiles, "lib", ".so", true, null)); + private static final GccLinker dllWindowsLinker = new GccLinker("gcc", objFiles, + discardFiles, "", ".dll", false, new GccLinker("gcc", objFiles, discardFiles, "", ".dll", true, null)); + private static final GccLinker dllWindowsClangLinker = new GccLinker("clang", objFiles, + discardFiles, "", ".dll", false, new GccLinker("clang", objFiles, discardFiles, "", ".dll", true, null)); + private static final GccLinker arLinker = new GccLinker("gcc", objFiles, discardFiles, "lib", ".a", false, new GccLinker("gcc", objFiles, discardFiles, "lib", ".a", true, null)); private static final GccLinker arClangLinker = new GccLinker("clang", objFiles, @@ -95,11 +100,11 @@ public class GccLinker extends GnuLinker { @Override protected final GnuLinker getStaticDllLinker() { - return dllLinker; + return isWindows() ? dllWindowsLinker : dllLinker; } @Override protected final GnuLinker getStaticDllClangLinker() { - return dllClangLinker; + return isWindows() ? dllWindowsClangLinker : dllClangLinker; } @Override protected final GnuLinker getStaticArLinker() { |