Skip to content

Commit

Permalink
Make SCons aware of all the Emscripten link outputs.
Browse files Browse the repository at this point in the history
  • Loading branch information
rmacnak committed Apr 27, 2024
1 parent bd07583 commit 102932d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -253,13 +253,20 @@ def BuildVM(cxx, arch, target_os, debug, sanitize):
os.path.join('double-conversion', cc + '.cc'))

if target_os == 'emscripten':
program = env.Program(os.path.join(outdir, 'primordialsoup.html'), objects)
program = env.Program([os.path.join(outdir, 'primordialsoup.html'),
os.path.join(outdir, 'primordialsoup.wasm'),
os.path.join(outdir, 'primordialsoup.js')],
objects)
Depends(program, 'meta/shell.html')

emrun_env = env.Clone()
emrun_env['LINKFLAGS'] += ['--emrun']
emrun_path = os.path.join(outdir, 'primordialsoup-emrun.html')
emrun_program = emrun_env.Program(emrun_path, objects)
emrun_paths = [
os.path.join(outdir, 'primordialsoup-emrun.html'),
os.path.join(outdir, 'primordialsoup-emrun.wasm'),
os.path.join(outdir, 'primordialsoup-emrun.js'),
]
emrun_program = emrun_env.Program(emrun_paths, objects)
Depends(emrun_program, 'meta/shell.html')
else:
program = env.Program(os.path.join(outdir, 'primordialsoup'), objects)
Expand Down

0 comments on commit 102932d

Please # to comment.