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.
Closes #118
Without this patch, cross compilation on MSVC seems to directly embed backslashes from the prefix argument as various string constants in a C file via defines, like
ENGINESDIR
. This causes a build failure, as these backslashes get picked up as escape sequences.Windows GNU targets are not affected by this issue, as they already do something similar to this patch within
sanitize_sh
.I think this issue is caused by OpenSSL using the unix makefile template for cross-building to Linux, which I believe is not capable of escaping backslashes in the prefix argument. I believe that this is why a normal MSVC build works and why cross builds fail.
I have tested that this on Windows 11; this patch allows me to cross compile from
x86_64-pc-windows-msvc
tox86_64-unknown-linux-gnu
andaarch64-unknown-linux-gnu
.