Skip to content

Commit fb7408b

Browse files
committed
Swift: Handle -emit-module in the tracer config
1 parent f6cddc9 commit fb7408b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

swift/tools/tracing-config.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,15 @@ function RegisterExtractorPack(id)
9999
if compilerName ~= 'swift-frontend' then
100100
return nil
101101
end
102-
-- Skip the invocation in case it's not called in `-frontend` mode
103-
if compilerArguments.argv[1] ~= '-frontend' then
102+
-- Skip the invocation in case it's not called in `-frontend` or `-emit-module` mode
103+
if compilerArguments.argv[1] ~= '-frontend' and compilerArguments.argv[1] ~= '-emit-module' then
104104
return nil
105105
end
106106

107107
-- Drop the `-frontend` argument
108-
table.remove(compilerArguments.argv, 1)
108+
if compilerArguments.argv[1] == '-frontend' then
109+
table.remove(compilerArguments.argv, 1)
110+
end
109111

110112
-- Skip "info" queries in case there is nothing to extract
111113
if compilerArguments.argv[1] == '-print-target-info' then

0 commit comments

Comments
 (0)