meson: gate MSVC-isms on argument syntax, not compiler id - #1090
Open
NathanGray-ChurchillNavigation wants to merge 1 commit into
Open
Conversation
clang-cl reports cc.get_id() == 'clang-cl', so it falls through both 'msvc' checks: it loses the __declspec(dllexport) export define, and it tries to find a libm that does not exist on Windows, which is a hard failure since the lookup is required. get_argument_syntax() is 'msvc' for both cl and clang-cl and 'gcc' otherwise, so this is a no-op for existing configurations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
clang-cl reports
cc.get_id() == 'clang-cl', so it falls through both'msvc'checks inmeson.build:__declspec(dllexport)and consumers fail to linkcc.find_library('m', required: true)on Windows, where there is nolibm - a hard configure failure
cc.get_argument_syntax()returns'msvc'for both cl and clang-cl and'gcc'otherwise, soswitching those two gates is a no-op for every configuration that works today.
The two
get_id()checks that pick warning flags are left alone - those are genuinely about flagspellings rather than argument syntax.