File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ public class CompileOptions
3030 [ DataMember ] public List < string > References = new List < string > ( ) ;
3131 [ DataMember ] public List < string > Files = new List < string > ( ) ;
3232 [ DataMember ] public List < string > NoWarnings = new List < string > ( ) ;
33+ [ DataMember ] public List < string > Options = new List < string > ( ) ;
3334 [ DataMember ] public DebugSymbolFileType DebugSymbolFile ;
3435 [ DataMember ] public PrebuiltOutputReuseType PrebuiltOutputReuse ;
3536
@@ -80,6 +81,10 @@ public void ParseArgument(string[] args)
8081 : id ) ;
8182 }
8283 break ;
84+
85+ default :
86+ Options . Add ( arg ) ;
87+ break ;
8388 }
8489 }
8590 else if ( arg . StartsWith ( "@" ) )
Original file line number Diff line number Diff line change @@ -69,7 +69,8 @@ private CompileResult BuildFull(CompileOptions options)
6969 _sourceMap . Values ,
7070 _referenceMap . Values ,
7171 new CSharpCompilationOptions ( OutputKind . DynamicallyLinkedLibrary )
72- . WithSpecificDiagnosticOptions ( specificDiagnosticOptions ) ) ;
72+ . WithSpecificDiagnosticOptions ( specificDiagnosticOptions )
73+ . WithAllowUnsafe ( options . Options . Contains ( "-unsafe" ) ) ) ;
7374
7475 Emit ( result ) ;
7576
You can’t perform that action at this time.
0 commit comments