[llvm] [Object][COFF][NFC] Document writeImportLibrary. (PR #81600)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 13 04:41:22 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-binary-utilities
Author: Jacek Caban (cjacek)
<details>
<summary>Changes</summary>
As suggested in #<!-- -->81426.
CC @<!-- -->zmodem
---
Full diff: https://github.com/llvm/llvm-project/pull/81600.diff
1 Files Affected:
- (modified) llvm/include/llvm/Object/COFFImportFile.h (+12)
``````````diff
diff --git a/llvm/include/llvm/Object/COFFImportFile.h b/llvm/include/llvm/Object/COFFImportFile.h
index 23c3e6a1f0784a..f4671d7405dbda 100644
--- a/llvm/include/llvm/Object/COFFImportFile.h
+++ b/llvm/include/llvm/Object/COFFImportFile.h
@@ -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.
Error writeImportLibrary(StringRef ImportName, StringRef Path,
ArrayRef<COFFShortExport> Exports,
ArrayRef<COFFShortExport> NativeExports,
``````````
</details>
https://github.com/llvm/llvm-project/pull/81600
More information about the llvm-commits
mailing list