aboutsummaryrefslogtreecommitdiff
path: root/emcc
diff options
context:
space:
mode:
authorMichael J. Bishop <mbtyke@gmail.com>2013-05-22 21:37:14 -0400
committerMichael Bishop <mbtyke@gmail.com>2013-05-23 11:51:25 -0400
commitc5fb79f031969c58bf9281e9b7b339076ca6a3c2 (patch)
tree34d60749e93a5dfb237676c8e6f46c6df3d08b18 /emcc
parente1703b407293121e2f2133d189c4438d039ea846 (diff)
Allowed Emscripten to recognize and compile .m and .mm files
(Objective-C and Objective-C++, respectively)
Diffstat (limited to 'emcc')
-rwxr-xr-xemcc7
1 files changed, 4 insertions, 3 deletions
diff --git a/emcc b/emcc
index acb59143..f3461c7b 100755
--- a/emcc
+++ b/emcc
@@ -601,7 +601,7 @@ if EMMAKEN_CFLAGS: CC_ADDITIONAL_ARGS += shlex.split(EMMAKEN_CFLAGS)
# ---------------- Utilities ---------------
-SOURCE_SUFFIXES = ('.c', '.cpp', '.cxx', '.cc')
+SOURCE_SUFFIXES = ('.c', '.cpp', '.cxx', '.cc', '.m', '.mm')
BITCODE_SUFFIXES = ('.bc', '.o', '.obj')
DYNAMICLIB_SUFFIXES = ('.dylib', '.so', '.dll')
STATICLIB_SUFFIXES = ('.a',)
@@ -629,8 +629,9 @@ header = False # pre-compiled headers. We fake that by just copying the file
for i in range(1, len(sys.argv)):
arg = sys.argv[i]
if not arg.startswith('-'):
- if arg.endswith('.c'):
- use_cxx = False
+ for extension in ['.c','.m']:
+ if arg.endswith(extension):
+ use_cxx = False
if arg.endswith('.h') and sys.argv[i-1] != '-include':
header = True