debug(traceback): worker stderr 输出并按 fail-fast 注入 main
并行 worker 的 _vlog 不汇总;改为 stderr 直接输出 enabled/InstallSymbol;main 找不到 Install 时明确报错。
This commit is contained in:
1 parent
2051c2237e
commit
2beb5d724f
2 files changed
+11
-4
No files matched your search
@@ -2054,12 +2054,16 @@ class FunctionHandle(BaseHandle):
|
||||
func_body = func_body[1:]
|
||||
else:
|
||||
Gen._create_doc_global(doc_symbol, None)
|
||||
if Node.name == 'main':
|
||||
if Node.name == 'main' and getattr(self.Trans, 'TracebackEnabled', False):
|
||||
_tb_install: str | None = getattr(self.Trans, 'TracebackInstallSymbol', None)
|
||||
if not _tb_install:
|
||||
_tb_sha1 = getattr(Gen, 'ModuleSha1Map', {}).get('traceback')
|
||||
if _tb_sha1:
|
||||
_tb_install = f'{_tb_sha1}.Install'
|
||||
if not _tb_install:
|
||||
raise RuntimeError(
|
||||
'--traceback: main 入口无法解析 traceback.Install 符号'
|
||||
'(TracebackInstallSymbol 未设置且 ModuleSha1Map 无 traceback)')
|
||||
if _tb_install:
|
||||
_install_fn = Gen._CreateOrReuseFuncDecl(
|
||||
_tb_install, ir.FunctionType(ir.IntType(32), []))
|
||||
|
||||
Reference in new issue
Block a user