This commit is contained in:
Alon Zakai 2013-06-24 18:44:51 -07:00
Родитель af60ede0bc
Коммит 74e60024e3
2 изменённых файлов: 8 добавлений и 5 удалений

7
emcc
Просмотреть файл

@ -1069,11 +1069,12 @@ try:
if shared.Settings.MAIN_MODULE:
assert not shared.Settings.SIDE_MODULE
shared.Settings.INCLUDE_FULL_LIBRARY = 1
shared.Settings.LINKABLE = 1 # TODO: add FORCE_DCE option for the brave people that do want to dce here and in side modules
debug_level = max(debug_level, 2) # preserve function names
elif shared.Settings.SIDE_MODULE:
assert not shared.Settings.MAIN_MODULE
shared.Settings.LINKABLE = 1
if shared.Settings.MAIN_MODULE or shared.Settings.SIDE_MODULE:
assert not memory_init_file, 'memory init file is not supported with module linking'
shared.Settings.LINKABLE = 1 # TODO: add FORCE_DCE option for the brave people that do want to dce here and in side modules
debug_level = max(debug_level, 2)
## Compile source code to bitcode

Просмотреть файл

@ -53,6 +53,8 @@ class AsmModule():
self.exports_js = post_js[ret:]
def relocate_into(self, main):
# heap initializer TODO
# imports
main_imports = set(main.imports)
new_imports = [imp for imp in self.imports if imp not in main_imports]
@ -74,9 +76,9 @@ class AsmModule():
shared.try_delete(temp)
main.extra_funcs_js = relocated_funcs.funcs_js.replace(js_optimizer.start_funcs_marker, '\n')
# tables
# tables TODO
# exports
# exports TODO
def write(self, out):
f = open(out, 'w')