aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc6
1 files changed, 5 insertions, 1 deletions
diff --git a/emcc b/emcc
index aa8827da..cb5ae86a 100755
--- a/emcc
+++ b/emcc
@@ -74,7 +74,7 @@ emcc can be influenced by a few environment variables:
EMMAKEN_COMPILER - The compiler to be used, if you don't want the default clang.
'''
-import os, sys, shutil, tempfile, subprocess, shlex
+import os, sys, shutil, tempfile, subprocess, shlex, stat
from subprocess import PIPE, STDOUT
from tools import shared
from tools.shared import Compression, execute, suffix, unsuffixed, unsuffixed_basename
@@ -1034,6 +1034,10 @@ try:
else:
# copy final JS to output
shutil.move(final, target)
+ # Make the target executable if it's a Javascript file
+ os.chmod(target, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR |
+ stat.S_IRGRP | stat.S_IWGRP | stat.S_IXGRP |
+ stat.S_IROTH | stat.S_IXOTH)
finally:
if not TEMP_DIR: