Skip to content

Commit 7b1b127

Browse files
authored
[lldb][Windows] Enforce exec permission using Platform::Install() from Windows host (#91887)
Target::Install() set 0700 permissions for the main executable file. Platform::Install() just copies permissions from the source. But the permission eFilePermissionsUserExecute is missing on the Windows host. A lot of tests failed in case of Windows host and Linux target because of this issue. There is no API to provide the exec flag. This patch set the permission eFilePermissionsUserExecute for all files installed via Platform::Install() from the Windows host. It fixes a lot of tests in case of Windows host and Linux target.
1 parent 8fe21fd commit 7b1b127

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lldb/source/Target/Platform.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ Status Platform::PutFile(const FileSpec &source, const FileSpec &destination,
12251225

12261226
uint32_t permissions = source_file.get()->GetPermissions(error);
12271227
if (permissions == 0)
1228-
permissions = lldb::eFilePermissionsFileDefault;
1228+
permissions = lldb::eFilePermissionsUserRWX;
12291229

12301230
lldb::user_id_t dest_file = OpenFile(
12311231
destination, File::eOpenOptionCanCreate | File::eOpenOptionWriteOnly |

0 commit comments

Comments
 (0)