-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Remove debug only attributes when Debugger.IsSupported is false. #39237
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,12 +83,6 @@ | |
<type fullname="System.Runtime.CompilerServices.CallerMemberNameAttribute"> | ||
<attribute internal="RemoveAttributeInstances" /> | ||
</type> | ||
<type fullname="System.Runtime.CompilerServices.CompilerGeneratedAttribute" feature="System.Diagnostics.Debugger.IsSupported" featurevalue="false"> | ||
<!-- | ||
The attribute is used during pretty stack trace printing | ||
--> | ||
<attribute internal="RemoveAttributeInstances" /> | ||
</type> | ||
<type fullname="System.Runtime.CompilerServices.CompilerGlobalScopeAttribute"> | ||
<attribute internal="RemoveAttributeInstances" /> | ||
</type> | ||
|
@@ -116,12 +110,52 @@ | |
<attribute internal="RemoveAttributeInstances" /> | ||
</type> | ||
|
||
<!-- Microsoft.ComponentModel --> | ||
<!-- System.ComponentModel --> | ||
<type fullname="System.ComponentModel.EditorBrowsableAttribute"> | ||
<attribute internal="RemoveAttributeInstances" /> | ||
</type> | ||
</assembly> | ||
|
||
<!-- The following attributes are only necessary when debugging is supported --> | ||
<assembly fullname="System.Private.CoreLib" feature="System.Diagnostics.Debugger.IsSupported" featurevalue="false"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As all these are feature-switch covered settings which are not wasm specific and we should move them to shared SPC There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I understand what makes the feature-switch covered attribute different from the rest of the attributes in this file. Why aren't the rest of them in the shared SPC? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The default SDK setup is trim with copy so it feels odd to include the list of always removed attribute for everyone but I'm not against ;-) |
||
<!-- Debugger specific attributes --> | ||
<type fullname="System.Diagnostics.DebuggableAttribute"> | ||
<attribute internal="RemoveAttributeInstances" /> | ||
</type> | ||
<type fullname="System.Diagnostics.DebuggerBrowsableAttribute"> | ||
<attribute internal="RemoveAttributeInstances" /> | ||
</type> | ||
<type fullname="System.Diagnostics.DebuggerDisplayAttribute"> | ||
<attribute internal="RemoveAttributeInstances" /> | ||
</type> | ||
<type fullname="System.Diagnostics.DebuggerHiddenAttribute"> | ||
<attribute internal="RemoveAttributeInstances" /> | ||
</type> | ||
<type fullname="System.Diagnostics.DebuggerNonUserCodeAttribute"> | ||
<attribute internal="RemoveAttributeInstances" /> | ||
</type> | ||
<type fullname="System.Diagnostics.DebuggerStepperBoundaryAttribute"> | ||
<attribute internal="RemoveAttributeInstances" /> | ||
</type> | ||
<type fullname="System.Diagnostics.DebuggerStepThroughAttribute"> | ||
<attribute internal="RemoveAttributeInstances" /> | ||
</type> | ||
<type fullname="System.Diagnostics.DebuggerTypeProxyAttribute"> | ||
eerhardt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
<attribute internal="RemoveAttributeInstances" /> | ||
</type> | ||
<type fullname="System.Diagnostics.DebuggerVisualizerAttribute"> | ||
<attribute internal="RemoveAttributeInstances" /> | ||
</type> | ||
|
||
<!-- Attributes used during pretty stack trace printing --> | ||
<type fullname="System.Diagnostics.StackTraceHiddenAttribute"> | ||
<attribute internal="RemoveAttributeInstances" /> | ||
</type> | ||
<type fullname="System.Runtime.CompilerServices.CompilerGeneratedAttribute"> | ||
<attribute internal="RemoveAttributeInstances" /> | ||
</type> | ||
</assembly> | ||
|
||
<!-- The following attributes are generated by the compiler, so they could be in any assembly --> | ||
<assembly fullname="*"> | ||
<!-- System.Runtime.CompilerServices --> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"featurevalue=false" means these can be removed when IsSupported is set to false, right? Just validating it's not actually setting IsSupported to false :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. Feature and featurevalue in the linker xml files are conditions. “Do this when this feature has this value”.