@@ -3,34 +3,43 @@ function RegisterExtractorPack(id)
3
3
' Semmle.Extraction.CSharp.Driver'
4
4
if OperatingSystem == ' windows' then extractor = extractor .. ' .exe' end
5
5
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
+ }),
8
10
CreatePatternMatcher ({' ^csc.*%.exe$' }, MatchCompilerName , extractor , {
9
- prepend = {' --compiler' , ' "${compiler}"' , ' --cil' }
11
+ prepend = {' --compiler' , ' "${compiler}"' , ' --cil' },
12
+ order = ORDER_BEFORE
13
+
10
14
}),
11
15
CreatePatternMatcher ({' ^fakes.*%.exe$' , ' moles.*%.exe' },
12
16
MatchCompilerName , nil , {trace = false })
13
17
}
14
18
local posixMatchers = {
15
19
CreatePatternMatcher ({' ^mcs%.exe$' , ' ^csc%.exe$' }, MatchCompilerName ,
16
20
extractor , {
17
- prepend = {' --compiler' , ' "${compiler}"' , ' --cil' }
21
+ prepend = {' --compiler' , ' "${compiler}"' , ' --cil' },
22
+ order = ORDER_BEFORE
23
+
18
24
}),
19
25
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 )
22
30
if MatchCompilerName (' ^msbuild$' , compilerName , compilerPath ,
23
31
compilerArguments ) or
24
32
MatchCompilerName (' ^xbuild$' , compilerName , compilerPath ,
25
33
compilerArguments ) then
26
34
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
+
34
43
}
35
44
end
36
45
end
0 commit comments