@@ -3,34 +3,43 @@ function RegisterExtractorPack(id)
33 ' Semmle.Extraction.CSharp.Driver'
44 if OperatingSystem == ' windows' then extractor = extractor .. ' .exe' end
55 local windowsMatchers = {
6- CreatePatternMatcher ({' ^dotnet%.exe$' }, MatchCompilerName , extractor ,
7- {prepend = {' --dotnetexec' , ' --cil' }}),
6+ CreatePatternMatcher ({' ^dotnet%.exe$' }, MatchCompilerName , extractor , {
7+ prepend = {' --dotnetexec' , ' --cil' },
8+ order = ORDER_BEFORE
9+ }),
810 CreatePatternMatcher ({' ^csc.*%.exe$' }, MatchCompilerName , extractor , {
9- prepend = {' --compiler' , ' "${compiler}"' , ' --cil' }
11+ prepend = {' --compiler' , ' "${compiler}"' , ' --cil' },
12+ order = ORDER_BEFORE
13+
1014 }),
1115 CreatePatternMatcher ({' ^fakes.*%.exe$' , ' moles.*%.exe' },
1216 MatchCompilerName , nil , {trace = false })
1317 }
1418 local posixMatchers = {
1519 CreatePatternMatcher ({' ^mcs%.exe$' , ' ^csc%.exe$' }, MatchCompilerName ,
1620 extractor , {
17- prepend = {' --compiler' , ' "${compiler}"' , ' --cil' }
21+ prepend = {' --compiler' , ' "${compiler}"' , ' --cil' },
22+ order = ORDER_BEFORE
23+
1824 }),
1925 CreatePatternMatcher ({' ^mono' , ' ^dotnet$' }, MatchCompilerName ,
20- extractor , {prepend = {' --dotnetexec' , ' --cil' }}),
21- function (compilerName , compilerPath , compilerArguments , _languageId )
26+ extractor , {
27+ prepend = {' --dotnetexec' , ' --cil' },
28+ order = ORDER_BEFORE
29+ }), function (compilerName , compilerPath , compilerArguments , _languageId )
2230 if MatchCompilerName (' ^msbuild$' , compilerName , compilerPath ,
2331 compilerArguments ) or
2432 MatchCompilerName (' ^xbuild$' , compilerName , compilerPath ,
2533 compilerArguments ) then
2634 return {
27- replace = true ,
28- invocations = {
29- BuildExtractorInvocation (id , compilerPath , compilerPath ,
30- compilerArguments , nil , {
31- ' /p:UseSharedCompilation=false'
32- })
33- }
35+ order = ORDER_REPLACE ,
36+ invocation = BuildExtractorInvocation (id , compilerPath ,
37+ compilerPath ,
38+ compilerArguments ,
39+ nil , {
40+ ' /p:UseSharedCompilation=false'
41+ })
42+
3443 }
3544 end
3645 end
0 commit comments