Skip to content

build/emit_c.w compiles emitted C with a host compiler (cc, clang++.exe) and Visual Studio/Windows SDK library paths #2782

Closed

Description

@ehartford

Ruling (Eric, 2026-10-28): the build depends on no Unix or Windows command; everything it needs is With-native, built into build.w.

build/emit_c.w emitc_c_compiler (line 76) resolves $WITH_EMIT_C_CC, $CC, $LLVM_PREFIX/bin/clang++, the SDK's clang++, and then falls back to the host's cc (POSIX) or clang++.exe (Windows). emitc_push_host_c_flags (line 118) targets *-pc-windows-msvc and links against Windows Kits/MSVC library directories (emitc_windows_um_libdir, _ucrt_libdir, _msvc_libdir).

Used by emit-c-test, emit-c-fixpoint and emit-c-roundtrip (run_bootstrap_c_emit_sources_action, lines 627–759), which are standalone targets that no suite depends on. The selfhost harness's emit-C checks moved to the compiler's own with cc on every host in the #809 stack (bs_c_compiler_argv). These should follow: <compiler> cc with its embedded sysroot, the windows-gnu target the real link uses, and no MSVC paths.

Not changed in the #809 stack because these targets rebuild the whole compiler through C and need their own verification run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions