Skip to content

Commit 9c73ae5

Browse files
committed
Swift: teach extractor to not produce artifacts
1 parent 5b75b4d commit 9c73ae5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

swift/extractor/main.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ class Observer : public swift::FrontendObserver {
1616
public:
1717
explicit Observer(const codeql::SwiftExtractorConfiguration& config) : config{config} {}
1818

19+
void parsedArgs(swift::CompilerInvocation& invocation) override {
20+
// Original compiler and the extractor-compiler get into conflicts when
21+
// both produce the same output files.
22+
// TODO: change the final arifact destinations instead of disabling
23+
// the artifact generation completely?
24+
invocation.getFrontendOptions().RequestedAction = swift::FrontendOptions::ActionType::Typecheck;
25+
}
26+
1927
void performedSemanticAnalysis(swift::CompilerInstance& compiler) override {
2028
codeql::extractSwiftFiles(config, compiler);
2129
}

0 commit comments

Comments
 (0)