code wiki / _hdl_build / nx_ccdiag.nx
nx_ccdiag.nx
buildroot/runtime/_hdl_build/nx_ccdiag.nx
about
nx_ccdiag.nx -- ONE-STEP build diagnostic (<10s): why did `nx_sov_build_run <name>` fail with "empty .s"?
The runner MUTES nx_cc's stderr (2>/dev/null) + retries 12x, so a plain source error (undefined function,
parse error, arg-count) surfaces only as a mysterious "COMPILE-FAIL (empty .s after retries)" -- which cost a
~15-build blind hunt. This tool runs the SAME sovereign compiler on the SAME source with stderr VISIBLE, once,
and prints the exit code + .s size + the real diagnostic line. Eats the debt: turn opaque empty-.s into the
actual cause in one look. Usage: nx_ccdiag <module-name> license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_itoa_lib.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 9 | const K_MAGIC_65536: i64 = 65536 |
functions
| 11 | func cd_puts(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 16 | func cd_putn(v: i64) -> i64 { nxi_out(v); return 0 } |
| 17 | func cd_cat(d: *u8, o: i64, s: *u8) -> i64 { var i: i64=0; while s[i]!=(0 as u8){d[o+i]=s[i]; i=i+1} return o+i } called by 1: main |
| 18 | func cd_exists(p: *u8) -> i64 { let fd: i64 = sys_openat_rd(p); if fd < 0 { return 0 } sys_close(fd); return 1 } |
| 19 | func cd_filesize(p: *u8) -> i64 |
| 27 | func cd_run_cc(cc: *u8, src: *u8, sfd: i64) -> i64 |
| 44 | func main(argc: i64, argv: *i64) -> i64 |