[lld] [llvm] [Object][COFF][NFC] Make writeImportLibrary NativeExports argument optional. (PR #81600)
Jacek Caban via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 05:25:34 PST 2024
================
@@ -135,6 +135,18 @@ struct COFFShortExport {
}
};
+/// Writes a COFF import library containing entries described by the Exports
+/// array.
+///
+/// For hybrid targets such as ARM64EC, additional native entry points can be
+/// exposed using the NativeExports parameter. When NativeExports is used, the
+/// output import library will expose these native ARM64 imports alongside the
+/// entries described in the Exports array. Such a library can be used for
+/// linking both ARM64EC and pure ARM64 objects, and the linker will pick only
+/// the exports relevant to the target platform.
+///
+/// For non-hybrid targets, the NativeExports parameter should not be used.
+/// Instead, pass std::nullopt or an empty array to this parameter.
----------------
cjacek wrote:
Sounds good to me, I did that in the new version, thanks! As I mentioned in #81426, I'm ultimately planning to use it in all in-tree callers. But indeed, I don't expect it to be interesting for majority of downstream users and making it optional seems like a good idea.
https://github.com/llvm/llvm-project/pull/81600
More information about the llvm-commits
mailing list