Skip to content

fix: support .ccm/.cxxm/.ixx module interface extensions#272

Open
ZheFeng7110 wants to merge 2 commits into
mcpp-community:mainfrom
ZheFeng7110:fix/support-not-only-cppm
Open

fix: support .ccm/.cxxm/.ixx module interface extensions#272
ZheFeng7110 wants to merge 2 commits into
mcpp-community:mainfrom
ZheFeng7110:fix/support-not-only-cppm

Conversation

@ZheFeng7110

Copy link
Copy Markdown
Contributor

Summary

plan.cppm hardcoded .cppm extension checks, causing non-.cppm module interface files (.ccm, .cxxm, .ixx) to have their object files excluded from link units, resulting in "module not found" linker errors.

Changes

  • src/build/plan.cppm: Link object collection now uses cu.providesModule semantic check instead of extension check; object_filename_for treats all 4 module extensions equally with .m prefix
  • src/build/execute.cppm: Freshness check now recognizes .ccm/.cxxm/.ixx
  • tests/unit/test_module_extensions.cpp (new): Unit tests for object_filename_for disambiguation
  • tests/e2e/152_module_extensions.sh (new): End-to-end build→link→run test for all 4 extensions

Test plan

  • mcpp build self-host passes
  • CI unit tests pass
  • CI E2E tests pass

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant