fix(traceback): main 注入支持从 ModuleSha1Map 解析 Install
TracebackInstallSymbol 未设置时,用 Gen.ModuleSha1Map['traceback'] 拼出 {sha1}.Install,确保 main 入口注入生效。
This commit is contained in:
1 parent
1f03fc1977
commit
39aebc03d7
1 file changed
+4
@@ -2056,6 +2056,10 @@ class FunctionHandle(BaseHandle):
|
||||
Gen._create_doc_global(doc_symbol, None)
|
||||
if Node.name == 'main':
|
||||
_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 _tb_install:
|
||||
_install_fn = Gen._CreateOrReuseFuncDecl(
|
||||
_tb_install, ir.FunctionType(ir.IntType(32), []))
|
||||
|
||||
Reference in new issue
Block a user