Revision 78b286ec5bee975732849aaa61a6a688a7114cc2 authored by Sam Clegg on 23 March 2024, 00:27:09 UTC, committed by GitHub on 23 March 2024, 00:27:09 UTC
See https://github.com/WebAssembly/binaryen/pull/6428
1 parent ecdca7b
Raw File
emscons.py
#!/usr/bin/env python3
"""Wrapping the scons invocation, EMSCRIPTEN_TOOL_PATH is set in the process
environment, and can be used to locate the emscripten SCons Tool.

Example:

# Load emscripten Tool
my_env = Environment(tools=['emscripten'], toolpath=[os.environ['EMSCRIPTEN_TOOL_PATH']])
"""

import os
import subprocess
import sys
from tools import utils

tool_path = utils.path_from_root('tools/scons/site_scons/site_tools/emscripten')

env = os.environ.copy()
env['EMSCRIPTEN_TOOL_PATH'] = tool_path

sys.exit(subprocess.call(sys.argv[1:], env=env))
back to top