Change compile time dependency of ICU API ucol_setMaxVariable to be runtime instead. #58485
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.
During building the runtime, we have a compile-time check to decide to link against the ICU API ucol_setVariableTop or ucol_setMaxVariable according to the ICU version installed on the build machine. That causes problems as we may compile against a higher version of ICU, and we run against a lower version of ICU which causes an error like
And cannot run dotnet or any .NET app on Linux. #57983 is example of the reported issue for that problem.
This change is getting rid of the compile-time check and making it a runtime check instead.