Files
codeql/swift/extractor/SwiftExtractorConfiguration.h
Paolo Tranquilli daf1fa3c31 Swift: lock built swiftmodule traps in main
This should cover `-merge-modules` mode.

Dumping of the configuration to the target files was moved to a
separate pair of header/source files, as now it is also done in
`SwiftOutputRewrite.cpp`.
2022-07-29 16:27:55 +02:00

40 lines
1.5 KiB
C++

#pragma once
#include <string>
#include <vector>
#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<std::string> frontendOptions;
// The patched arguments passed to the swift::performFrontend/ Used for debugging.
std::vector<std::string> 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