[llvm] [llvm-ar] Use COFF archive format for COFF targets. (PR #82642)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 22 23:52:21 PST 2024
================
@@ -969,12 +969,19 @@ Archive::Archive(MemoryBufferRef Source, Error &Err)
Err = Error::success();
}
+object::Archive::Kind Archive::getDefaultKindForTriple(Triple &T) {
+ if (T.isOSDarwin())
+ return object::Archive::K_DARWIN;
+ if (T.isOSAIX())
+ return object::Archive::K_AIXBIG;
+ if (T.isOSWindows())
+ return object::Archive::K_COFF;
----------------
jh7370 wrote:
I'm a little nervous about how this impacts the default archive format on a Windows host: our downstream uses a cross-compiler, typically hosted on Windows, but using GNU-style archives (and the objects therefore have a different triple too).
I'm going to suggest to our internal binutils team that they run some testing with this patch applied, to see if it makes any difference.
https://github.com/llvm/llvm-project/pull/82642
More information about the llvm-commits
mailing list