Remove SORTPP_PASS which breaks modern Windows SDKs.#1017
Remove SORTPP_PASS which breaks modern Windows SDKs.#1017kelson42 merged 1 commit intoopenzim:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes compilation errors on Windows by removing the SORTPP_PASS macro which is an internal Windows SDK preprocessor flag that causes malformed C++ syntax when used with modern Windows SDKs (10.0.26100.0).
- Removes the
-DSORTPP_PASScompile argument from the Windows build configuration - Retains necessary Windows-specific linker flags (
-lRpcrt4,-lWs2_32,-lwinmm,-lshlwapi)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if build_machine.system() == 'windows' | ||
| win_deps = declare_dependency( | ||
| compile_args: ['-DSORTPP_PASS'], | ||
| link_args: ['-lRpcrt4', '-lWs2_32', '-lwinmm', '-lshlwapi'] |
There was a problem hiding this comment.
| link_args: ['-lRpcrt4', '-lWs2_32', '-lwinmm', '-lshlwapi'] | |
| link_args: ['-lrpcrt4', '-lws2_32', '-lwinmm', '-lshlwapi'] |
for mingw on case-sensitive non-windows systems.
There was a problem hiding this comment.
@dg0yt Let the PR serve the purpose formulated in its title/description. But feel free to submit a different PR with this change.
|
Let's see if our CI is compatible with that change. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1017 +/- ##
==========================================
- Coverage 58.13% 56.18% -1.96%
==========================================
Files 101 101
Lines 5384 4989 -395
Branches 2197 2170 -27
==========================================
- Hits 3130 2803 -327
+ Misses 795 739 -56
+ Partials 1459 1447 -12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
veloman-yunkan
left a comment
There was a problem hiding this comment.
The CI works with the proposed change. I don't see any reasons to reject it.
|
Thanks! |
Removes
SORTPP_PASSwhich appears to be an internal Windows SDK macro they use when they aren't expecting to be input to a normal C++ compiler. This results in errors like:due to this block in WinUser.h:
which becomes malformed C++ with that macro.