diff options
| author | Alon Zakai <alonzakai@gmail.com> | 2012-03-31 13:49:58 -0700 | 
|---|---|---|
| committer | Alon Zakai <alonzakai@gmail.com> | 2012-03-31 13:49:58 -0700 | 
| commit | f485a33d653a7c600e94ea99446686c672956751 (patch) | |
| tree | 30c238bb8747223f88ce0cc841bc94e87fcf0246 | |
| parent | 7ffc6a36a2b3ecd04d83e1b5c07a4967e99fbd1b (diff) | |
fix -M -MM to add emcc compiler flags
| -rwxr-xr-x | emcc | 2 | ||||
| -rwxr-xr-x | tests/runner.py | 5 | 
2 files changed, 4 insertions, 3 deletions
@@ -361,7 +361,7 @@ for i in range(1, len(sys.argv)):  if '-M' in sys.argv or '-MM' in sys.argv:    # Just output dependencies, do not compile. Warning: clang and gcc behave differently with -MF! (clang seems to not recognize it) -  cmd = [CC] + sys.argv[1:] +  cmd = [CC] + shared.COMPILER_OPTS + sys.argv[1:]    if DEBUG: print >> sys.stderr, 'emcc, just dependencies: ', ' '.join(cmd)    exit(subprocess.call(cmd)) diff --git a/tests/runner.py b/tests/runner.py index b6522aca..f31a5098 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -6724,10 +6724,11 @@ f.close()          self.assertIdentical(expected, output.replace('\n\n', '\n'))      def test_m_mm(self): -      open(os.path.join(self.get_dir(), 'foo.c'), 'w').write('''/* */''') +      open(os.path.join(self.get_dir(), 'foo.c'), 'w').write('''#include <emscripten.h>''')        for opt in ['M', 'MM']: -        output = Popen(['python', EMCC, os.path.join(self.get_dir(), 'foo.c'), '-' + opt], stdout=PIPE).communicate()[0] +        output, err = Popen(['python', EMCC, os.path.join(self.get_dir(), 'foo.c'), '-' + opt], stdout=PIPE, stderr=PIPE).communicate()          assert 'foo.o: ' in output, '-%s failed to produce the right output: %s' % (opt, output) +        assert 'error' not in err, 'Unexpected stderr: ' + err      def test_llvm_nativizer(self):        # avoid impure_ptr problems etc.  | 
