6 Commits

Author SHA1 Message Date
xgopilot
04ef1b0767 build: remove incorrect TODO comment
Remove TODO(lijie) comment as requested - the syscall.init weak stub is intentional.

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: cpunion <8459+cpunion@users.noreply.github.com>
2025-11-16 09:16:36 +00:00
xgopilot
9b71b3f2dc build: apply review feedback on main module generation
- Remove sizeTypeForArch, use prog.Uintptr() directly
- Replace charPtrType with prog.CStr()
- Add back TODO(lijie) comment for syscall patch workaround

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: cpunion <8459+cpunion@users.noreply.github.com>
2025-11-16 05:28:10 +00:00
xgopilot
9926c4ed6a build: apply review feedback on main module generation
- Change pkg.PkgPath to pkg.ID for better debugging support
- Add comment explaining syscall.init weak stub declaration
- Simplify sizeTypeForArch to use prog.Uintptr() directly
- Remove unused runtime import

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: cpunion <8459+cpunion@users.noreply.github.com>
2025-11-16 04:35:41 +00:00
xgopilot
7b7d7f9cdb build: remove error return from genMainModule
The genMainModule function never returns an error, so simplified
its signature to return only Package.

Updated:
- genMainModule signature: (Package, error) -> Package
- Call site in build.go to not handle error
- Both test cases to remove error checking

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: cpunion <8459+cpunion@users.noreply.github.com>
2025-11-14 22:03:36 +00:00
xgopilot
131fe2c504 fix: separate stdout and stderr null checks in emitStdioNobuf
The original code incorrectly used the stdout null check condition
for both stdout and stderr pointer selection. This caused incorrect
behavior when stderr is null but stdout is not, or vice-versa.

This fix separates the null checks for stdout and stderr into
independent conditions, ensuring each stream is properly selected
based on its own null status.

Generated with [codeagent](https://github.com/qbox/codeagent)
Co-authored-by: cpunion <8459+cpunion@users.noreply.github.com>
2025-11-14 15:57:00 +00:00
Li Jie
33a53b6e64 build: refactor main module generation 2025-11-14 23:39:56 +08:00