Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable macros to use certain things from the OS module when the targe…
…t OS is not supported (#24639) Essentially this PR removes the `{.error.}` pragmas littered around in the OS module and submodules which prevents them from being imported if the target OS is not supported. This made it impossible to use certain supported features of the OS module in macros from a supported host OS. Instead of the `{.error.}` pragmas the `oscommon` module now has a constant `supportedSystem` which is false in the cases where the `{.error.}` pragmas where generated. All procedures which can't be run by macros is also not declared when `supportedSystem` is false. It would be possible to create dummy versions of the omitted functions with an `{.error.}` pragma that would trigger upon their use, but this is currently not done. This properly fixes #19414 (cherry picked from commit 1f9cac1)
- Loading branch information