#pragma once #include #include #include "swift/extractor/infra/TargetFile.h" namespace codeql { struct SwiftExtractorConfiguration { // The location for storing TRAP files to be imported by CodeQL engine. std::string trapDir; // The location for storing extracted source files. std::string sourceArchiveDir; // A temporary directory that exists during database creation, but is deleted once the DB is // finalized. std::string scratchDir; // The original arguments passed to the extractor. Used for debugging. std::vector frontendOptions; // The patched arguments passed to the swift::performFrontend/ Used for debugging. std::vector patchedFrontendOptions; // A temporary directory that contains TRAP files before they are moved into their final // destination. std::string getTempTrapDir() const { return scratchDir + "/swift-trap-temp"; } // VFS (virtual file system) support. // A temporary directory that contains VFS files used during extraction. std::string getVFSDir() const { return scratchDir + "/swift-vfs"; } // A temporary directory that contains temp VFS files before they moved into VFSDir. std::string getTempVFSDir() const { return scratchDir + "/swift-vfs-temp"; } // A temporary directory that contains build artifacts generated by the extractor during the // overall extraction process. std::string getTempArtifactDir() const { return scratchDir + "/swift-extraction-artifacts"; } }; } // namespace codeql