Skip to content

Commit ccb6223

Browse files
authored
Merge pull request #13382 from tamasvajk/feature/standalone-dll-unsafe
C#: Change standalone extraction to allow unsafe code
2 parents 6d7234f + 75bc875 commit ccb6223

File tree

1 file changed

+3
-1
lines changed
  • csharp/extractor/Semmle.Extraction.CSharp.Standalone

1 file changed

+3
-1
lines changed

csharp/extractor/Semmle.Extraction.CSharp.Standalone/Extractor.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ private static void AnalyseStandalone(
3333
CSharp.Extractor.Analyse(stopwatch, analyser, options,
3434
references => GetResolvedReferencesStandalone(referencePaths, references),
3535
(analyser, syntaxTrees) => CSharp.Extractor.ReadSyntaxTrees(sources, analyser, null, null, syntaxTrees),
36-
(syntaxTrees, references) => CSharpCompilation.Create("csharp.dll", syntaxTrees, references),
36+
(syntaxTrees, references) => CSharpCompilation.Create(
37+
"csharp.dll", syntaxTrees, references, new CSharpCompilationOptions(OutputKind.ConsoleApplication, allowUnsafe: true)
38+
),
3739
(compilation, options) => analyser.Initialize(compilation, options),
3840
() => { },
3941
_ => { },

0 commit comments

Comments
 (0)