Skip to content

host-module BMI reaches cl.exe in clang's name=path spelling under windows = "msvc@system" (C1083) #604

Description

@Sunrisepeak

Symptom

With [toolchain] windows = "msvc@system", a package that has a host-module
build-dependency fails while compiling the build program:

error: host module 'huxerui.rules' compile failed (exit 2):
c1xx: fatal error C1083: Cannot open source file:
  'huxerui.rules.sources=D:\a\HuxerUI\HuxerUI\target\.build-mcpp\huxerui.rules.sources.ifc':
  No such file or directory

cl.exe is reading huxerui.rules.sources=<path>.ifc as a source file
name
. That string is clang's spelling of a module reference
(-fmodule-file=<name>=<path>); MSVC takes /reference <name>=<path> as two
arguments, and /reference is absent here.

The same package builds with mcpp's default Windows toolchain (clang targeting
x86_64-pc-windows-msvc) and on Linux and macOS.

Shape of the project

# mcpp.toml
[toolchain]
windows = "msvc@system"

[build-dependencies]
huxerui-build-rules = { path = "mcpp/huxerui-build-rules", host-module = true, reexport = true }

huxerui-build-rules itself declares an inner host module:

# mcpp/huxerui-build-rules/mcpp.toml
[build-dependencies]
huxerui-source-select = { path = "../huxerui-source-select", host-module = true }

So the failing edge is the inner one: huxerui.rules is compiled with a
reference to huxerui.rules.sources, and that reference reaches cl.exe in
clang's syntax.

Environment

  • mcpp 2026.9.10.2
  • GitHub windows-2022: VS 2022 Enterprise 17.14, VC tools 14.44.35207,
    cl 19.44.35211
  • Selected with mcpp toolchain default msvc@system equivalent (manifest key)

Why it matters here

msvc@system is the way to reach import std; at c++20 on Windows while
#603 stands, and it is also the compiler the project's other
build system (CMake) uses, so selecting it would make the two agree. Both
motivations are blocked by this.

An earlier attempt on 2026.9.8.1 failed the same way at link rather than at
compile (LNK1104: cannot open file 'huxerui.rules=...ifc'), so the mis-spelled
reference appears on more than one command line.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions