Skip to content

Commit f6187de

Browse files
committed
llc: Try to make the output executable
To emulate the behavior of native linkers
1 parent abafb49 commit f6187de

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/tools/llc/llc.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,9 @@ static int compileModule(char **argv, LLVMContext &Context) {
760760

761761
// Declare success.
762762
Out->keep();
763+
// Try to make the output executable, some build systems depend on it
764+
sys::fs::perms NewPerms = static_cast<sys::fs::perms>(0755);
765+
sys::fs::setPermissions(OutputFilename, NewPerms);
763766
if (DwoOut)
764767
DwoOut->keep();
765768

0 commit comments

Comments
 (0)