Skip to content

Commit 9bbf760

Browse files
committed
support for ignoring nacl intrinsics
1 parent b988457 commit 9bbf760

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

emscripten.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,7 @@ def emscript_fast(infile, settings, outfile, libraries=[], compiler_engine=None,
796796
if DEBUG: logging.debug('emscript: js compiler glue')
797797

798798
# Integrate info from backend
799-
settings['DEFAULT_LIBRARY_FUNCS_TO_INCLUDE'] = settings['DEFAULT_LIBRARY_FUNCS_TO_INCLUDE'] + metadata['declares']
799+
settings['DEFAULT_LIBRARY_FUNCS_TO_INCLUDE'] = settings['DEFAULT_LIBRARY_FUNCS_TO_INCLUDE'] + map(shared.JS.to_nice_ident, metadata['declares'])
800800

801801
# Settings changes
802802
assert settings['TARGET_LE32'] == 1

src/library.js

+4
Original file line numberDiff line numberDiff line change
@@ -4665,6 +4665,10 @@ LibraryManager.library = {
46654665

46664666
llvm_dbg_declare__inline: function() { throw 'llvm_debug_declare' }, // avoid warning
46674667

4668+
// llvm-nacl
4669+
4670+
llvm_nacl_atomic_store_i32__inline: true,
4671+
46684672
// ==========================================================================
46694673
// llvm-mono integration
46704674
// ==========================================================================

tools/shared.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,7 @@ class JS:
15091509

15101510
@staticmethod
15111511
def to_nice_ident(ident): # limited version of the JS function toNiceIdent
1512-
return ident.replace('%', '$').replace('@', '_')
1512+
return ident.replace('%', '$').replace('@', '_').replace('.', '_')
15131513

15141514
@staticmethod
15151515
def make_initializer(sig, settings=None):

0 commit comments

Comments
 (0)