Skip to content

Commit 2f539b8

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

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

llvm/tools/llc/llc.cpp

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

761761
// Declare success.
762762
Out->keep();
763+
if(TheTriple.isCheerpOS()) {
764+
// Try to make the output executable, some build systems depend on it
765+
sys::fs::perms NewPerms = static_cast<sys::fs::perms>(0755);
766+
sys::fs::setPermissions(OutputFilename, NewPerms);
767+
}
763768
if (DwoOut)
764769
DwoOut->keep();
765770

0 commit comments

Comments
 (0)