mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
ModuleObjCTrace/CAS: compute objc trace file paths via the canoical supplementary output paths computation
CAS support in compiler relies on supplementary paths to decide the mapping between input and output files. Therefore, we have to compute the paths of the module ObjC trace files in this canonical place to have CAS support for this newly added ObjC message trace files.
This commit is contained in:
@@ -854,7 +854,8 @@ public:
|
||||
};
|
||||
|
||||
static void createObjCMessageTraceFile(const InputFile &input, ModuleDecl *MD) {
|
||||
if (input.getLoadedModuleTracePath().empty()) {
|
||||
StringRef tracePath = input.getModuleObjCTracePath();
|
||||
if (tracePath.empty()) {
|
||||
// we basically rely on the passing down of module trace file path
|
||||
// as an indicator that this job needs to emit an ObjC message trace file.
|
||||
// FIXME: add a separate swift-frontend flag for ObjC message trace path
|
||||
@@ -882,15 +883,6 @@ static void createObjCMessageTraceFile(const InputFile &input, ModuleDecl *MD) {
|
||||
if (filesToWalk.empty()) {
|
||||
return;
|
||||
}
|
||||
llvm::SmallString<128> tracePath;
|
||||
if (const char *P = ::getenv("SWIFT_COMPILER_OBJC_MESSAGE_TRACE_PATH")) {
|
||||
StringRef FilePath = P;
|
||||
llvm::sys::path::append(tracePath, FilePath);
|
||||
} else {
|
||||
llvm::sys::path::append(tracePath, input.getLoadedModuleTracePath());
|
||||
llvm::sys::path::remove_filename(tracePath);
|
||||
llvm::sys::path::append(tracePath, ".SWIFT_FINE_DEPENDENCY_TRACE.json");
|
||||
}
|
||||
// Write output via atomic append.
|
||||
llvm::vfs::OutputConfig config;
|
||||
config.setAppend().setAtomicWrite();
|
||||
|
||||
Reference in New Issue
Block a user