Skip to content

Commit

Permalink
Revert "Fix WASM=0 warning in gen_struct_info (emscripten-core#8497)"
Browse files Browse the repository at this point in the history
This reverts commit 8d3b178.
  • Loading branch information
VirtualTim authored May 23, 2019
1 parent 5ded065 commit daf1f91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 5 additions & 5 deletions embuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from __future__ import print_function
import logging
import os
import subprocess
import sys

from tools import shared
Expand Down Expand Up @@ -148,10 +147,11 @@ def build(src, result_libs, args=[]):
cpp = os.path.join(temp_dir, 'src.cpp')
open(cpp, 'w').write(src)
temp_js = os.path.join(temp_dir, 'out.js')
try:
shared.Building.emcc(cpp, args, output_filename=temp_js)
except subprocess.CalledProcessError as e:
shared.exit_with_error("embuilder: emcc command failed with %d: '%s'", e.returncode, ' '.join(e.cmd))
shared.Building.emcc(cpp, args, output_filename=temp_js)

# verify
if not os.path.exists(temp_js):
shared.exit_with_error('failed to build file')

for lib in result_libs:
if not os.path.exists(shared.Cache.get_path(lib)):
Expand Down
4 changes: 1 addition & 3 deletions tools/gen_struct_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,7 @@ def inspect_code(headers, cpp_opts, structs, defines):
# Compile the program.
show('Compiling generated code...')
# -Oz optimizes enough to avoid warnings on code size/num locals
cmd = [shared.PYTHON, shared.EMCC] + cpp_opts + ['-o', js_file[1], src_file[1], '-s', 'BOOTSTRAPPING_STRUCT_INFO=1', '-s', 'WARN_ON_UNDEFINED_SYMBOLS=0', '-O0', '--js-opts', '0', '--memory-init-file', '0', '-s', 'SINGLE_FILE=1', '-Wno-format']
if not shared.Settings.WASM_BACKEND:
cmd += ['-s', 'WASM=0']
cmd = [shared.PYTHON, shared.EMCC] + cpp_opts + ['-o', js_file[1], src_file[1], '-s', 'BOOTSTRAPPING_STRUCT_INFO=1', '-s', 'WARN_ON_UNDEFINED_SYMBOLS=0', '-O0', '--js-opts', '0', '--memory-init-file', '0', '-s', 'SINGLE_FILE=1', '-s', 'WASM=0', '-Wno-format']
if shared.Settings.WASM_OBJECT_FILES:
cmd += ['-s', 'WASM_OBJECT_FILES=1']

Expand Down

0 comments on commit daf1f91

Please sign in to comment.