[LLD] [COFF] Fix export directives in object files from -includeoptional
When an object file contains an export directive, we normally do some amount of deferred processing of them at the end of the linking process. The -includeoptional option was handled after this, and any object files (defining new exports) weren't handled. Move the handling of the -includeoptional into the same late loop which does the fixups for e.g. export directives. Ideally, this would also be done for object files that are pulled in by the wrap options, and for mingw autoimports, but those changes require more modifications, to make them safe for potentially being executed multiple times. This fixes https://github.com/llvm/llvm-project/issues/57243. Differential Revision: https://reviews.llvm.org/D132361
Loading
Please sign in to comment