Commit d01fd2c5 authored by John Zhang's avatar John Zhang

use environment variable MU_LOG_LEVEL to control log level

parent e292668e
Pipeline #188 passed with stage
in 24 minutes and 55 seconds
......@@ -67,13 +67,16 @@ def fncptr_from_c_script(c_src_name, name, argtypes=[], restype=ctypes.c_ulonglo
def fncptr_from_py_script(py_fnc, name, argtypes=[], restype=ctypes.c_longlong):
import os
# NOTE: requires mu-client-pypy
from rpython.rlib import rmu_fast as rmu
# load libmu before rffi so to load it with RTLD_GLOBAL
libmu = ctypes.CDLL(libmu_path.strpath, ctypes.RTLD_GLOBAL)
mu = rmu.MuVM("--log-level=none --aot-emit-dir=emit")
loglvl = os.environ.get('MU_LOG_LEVEL', 'none')
emit_dir = os.environ.get('MU_EMIT_DIR', 'emit')
mu = rmu.MuVM("--log-level=%(loglvl)s --aot-emit-dir=%(emit_dir)s" % locals())
ctx = mu.new_context()
bldr = ctx.new_ir_builder()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment