This repository has been archived by the owner on Oct 17, 2021. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We cannot simply explicitly spell out the linked library name in
general. On Windows, the name of the library is determined by the
library in use and selects across the following matrix:
libxml2sd.lib
libxml2s.lib
xml2d.lib
xml2.lib
Note that this already assumes that the dynamic MSVC library (
/MD
)build is in use. The selection between
/MD
and/MT
is not somethingthat can be identified by the name.
Accommodating this within the modulemap is not entirely reasonable. As
a result, in order to maintain compatibility with the current behaviour,
I've resorted to some module level inline assembly (simply to avoid
adding a source file as there is no source file currently for the
module). By hand constructing the linker directives for Linux and
macOS, we can continue to have the autolinking behaviour which can
support all the platforms.
The alternative to all this mess would be to require the user to specify
the location of the import library, DSO, or TBD (depending on the
platform) manually when invoking the swift build tool.