File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
src/libraries/System.Runtime.InteropServices.JavaScript/gen/JSImportGenerator Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -241,9 +241,7 @@ private static NamespaceDeclarationSyntax GenerateRegSource(
241241 . WithModifiers ( TokenList ( new [ ] { Token ( SyntaxKind . StaticKeyword ) } ) )
242242 . WithBody ( Block ( registerStatements ) ) ;
243243
244- // HACK: protect the code from trimming by putting it behind a comparison we know
245- // will always evaluate to false at runtime, but the linker can't see through at
246- // build time. It seems there's no attribute to block trimming of a method?
244+ // HACK: protect the code from trimming with DynamicDependency attached to a ModuleInitializer
247245 MemberDeclarationSyntax initializerMethod = MethodDeclaration ( PredefinedType ( Token ( SyntaxKind . VoidKeyword ) ) , Identifier ( selfInitName ) )
248246 . WithAttributeLists (
249247 SingletonList < AttributeListSyntax > (
You can’t perform that action at this time.
0 commit comments