-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass warning options to ILLink #12601
Comments
I don't understand the difference between WarningVersion and WarningLevel, and why its version based. I am assuming the names we are talking about here are in MSBuild, in which case ILLink is more descriptive which is a good thing. |
WarningLevel is the name of the SDK option that controls Optionally, the developer will be able to set I hope that answers your question - it's described in more detail in #12601, with a modification to the design in dotnet/roslyn#46148. They initially introduced a separate property and command-line, but decided to repurpose the existing
Yup. I went ahead and called the command-line |
I agree with using Regarding WarningLevel/WarningVersion:
|
For consistency then let's go with From dotnet/roslyn-analyzers#3823 it sounds like the feature is planned to have a VS UI, but it's unclear if they will reuse the "Warning Level" UI now that they are reusing the edit: It sounds like the UI will have a drop-down for |
The linker is adding options
--nowarn
,--warnaserror
, and--warn
to control warning behavior similar to the Roslyn. We need to pass appropriate MSBuild properties as inputs to these in the SDK.NoWarn
should simply be passed to the linker. It will ignore error codes that don't begin withIL
.WarningsAsErrors
/WarningsNotAsErrors
similarly should be passed directly to the linker.TreatWarningsAsErrors
should set another linker-specific property (tentativelyILLinkTreatWarningsAsErrors
) with the same semantics, which gets passed to the linker. This is to allow the setting to be controlled independently for the linker and the compiler if desired.AnalysisLevel
should set a linker-specific property (tentativelyILLinkWarningVersion
), which gets passed to the linker to control warning versions. The linker-specific property is similar toWarningLevel
for the compiler (see https://github.com/dotnet/sdk/pull/12422/files). I'm suggestingVersion
instead ofLevel
because this is more accurate, whereas Roslyn is repurposing an existing option whose meaning used to be different.The reason I am suggesting
ILLink
as the prefix rather thanTrimmer
is that these options are conceptually not specific to trimming - we will use the same properties in the future if we introduce single-file-correctness analysis in the linker.@samsp-msft again, would appreciate your feedback on the naming.
@vitek-karas @eerhardt
The text was updated successfully, but these errors were encountered: