diff options
Diffstat (limited to 'third_party/waf/waflib/extras/c_emscripten.py')
-rw-r--r-- | third_party/waf/waflib/extras/c_emscripten.py | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/third_party/waf/waflib/extras/c_emscripten.py b/third_party/waf/waflib/extras/c_emscripten.py index 6e7fbbe1142..b23d770b43b 100644 --- a/third_party/waf/waflib/extras/c_emscripten.py +++ b/third_party/waf/waflib/extras/c_emscripten.py @@ -1,3 +1,7 @@ +#! /usr/bin/env python +# encoding: utf-8 +# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file + #!/usr/bin/env python # -*- coding: utf-8 vi:ts=4:noexpandtab @@ -32,7 +36,7 @@ def get_emscripten_version(conf, cc): conf.fatal('Could not determine emscripten version %r: %s' % (cmd, e)) if not isinstance(out, str): - out = out.decode(sys.stdout.encoding or 'iso8859-1') + out = out.decode(sys.stdout.encoding or 'latin-1') k = {} out = out.splitlines() @@ -76,21 +80,12 @@ def configure(conf): conf.env.ARFLAGS = ['rcs'] conf.env.cshlib_PATTERN = '%s.js' conf.env.cxxshlib_PATTERN = '%s.js' - conf.env.cstlib_PATTERN = '%s.bc' - conf.env.cxxstlib_PATTERN = '%s.bc' + conf.env.cstlib_PATTERN = '%s.a' + conf.env.cxxstlib_PATTERN = '%s.a' conf.env.cprogram_PATTERN = '%s.html' conf.env.cxxprogram_PATTERN = '%s.html' + conf.env.CXX_TGT_F = ['-c', '-o', ''] + conf.env.CC_TGT_F = ['-c', '-o', ''] + conf.env.CXXLNK_TGT_F = ['-o', ''] + conf.env.CCLNK_TGT_F = ['-o', ''] conf.env.append_value('LINKFLAGS',['-Wl,--enable-auto-import']) - -@feature('c', 'cxx', 'acm', 'includes') -@after_method('propagate_uselib_vars', 'process_source', 'apply_incpaths') -def apply_incpaths_emscripten(self): - """ - Emscripten doesn't like absolute include paths - """ - # TODO: in waf 1.9 we can switch back to bldnode as the default since path_from handles cross-drive paths - if self.env.CC_NAME != 'emscripten' or self.env.CC_NAME != 'emscripten': - return - lst = self.to_incnodes(self.to_list(getattr(self, 'includes', [])) + self.env['INCLUDES']) - self.includes_nodes = lst - self.env['INCPATHS'] = [x.path_from(self.bld.bldnode) for x in lst] |