mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[Frontend] Lock the swiftmodule when rebuilding from the swiftinterface
When rebuilding a module interface from the textual interface, lock the destination path of the created swiftmodule instead of the source swiftinterface. The swiftinterface files are likely to be in the SDK and may be on a read-only filesystem. rdar://60247977
This commit is contained in:
@@ -290,7 +290,7 @@ bool ModuleInterfaceBuilder::buildSwiftModule(StringRef OutPath,
|
||||
// processes are doing the same.
|
||||
// FIXME: We should surface the module building step to the build system so
|
||||
// we don't need to synchronize here.
|
||||
llvm::LockFileManager Locked(interfacePath);
|
||||
llvm::LockFileManager Locked(OutPath);
|
||||
switch (Locked) {
|
||||
case llvm::LockFileManager::LFS_Error:{
|
||||
// ModuleInterfaceBuilder takes care of correctness and locks are only
|
||||
|
||||
Reference in New Issue
Block a user