From 4bdde31a160fdd8af1c53d4c4c518c452e626690 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Tue, 30 Jun 2026 12:54:33 +0800 Subject: [PATCH 1/2] test(build-mcpp): use the typed import mcpp; build module (Clang CI coverage) Converts the build-mcpp member's build.mcpp to import mcpp; (modules-first; textual #include only for file I/O). On macOS/Windows the workspace job runs this under clang, exercising the import-mcpp Clang module path. Needs mcpp >= 0.0.81. (held until 0.0.81 is released) --- tests/examples/build-mcpp/build.mcpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/examples/build-mcpp/build.mcpp b/tests/examples/build-mcpp/build.mcpp index 123e053..06fae8b 100644 --- a/tests/examples/build-mcpp/build.mcpp +++ b/tests/examples/build-mcpp/build.mcpp @@ -1,13 +1,13 @@ -// Native build program: generate a source the test links + define a macro the -// test sees. mcpp compiles+runs this (cwd = project root) before the build. +// Modules-first build program: import mcpp; for the typed directive API. A textual +// #include is still fine for file I/O (only `import std;` is unnecessary). #include #include -#include +import mcpp; int main() { std::filesystem::create_directories("src"); std::ofstream("src/generated.cpp") << "int answer() { return 42; }\n"; - std::puts("mcpp:generated=src/generated.cpp"); - std::puts("mcpp:cxxflag=-DBUILT_BY_BUILD_MCPP=1"); - std::puts("mcpp:rerun-if-changed=build.mcpp"); + mcpp::generated("src/generated.cpp"); + mcpp::define("BUILT_BY_BUILD_MCPP"); // cfg= → -DBUILT_BY_BUILD_MCPP + mcpp::rerun_if_changed("build.mcpp"); return 0; } From 163f187b4c5cef73ea8af10616d5aed63f7e6fe8 Mon Sep 17 00:00:00 2001 From: sunrisepeak Date: Tue, 30 Jun 2026 13:49:22 +0800 Subject: [PATCH 2/2] ci: bump mcpp 0.0.79 -> 0.0.81 (typed import mcpp; for build-mcpp member) --- .github/workflows/validate.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 6eb6e1d..32bef31 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -13,7 +13,7 @@ on: env: # Bumped to 0.0.78: carries L3 build.mcpp native build program (build-mcpp member), # compat.openblas Windows recipe (bin/libopenblas.dll staged beside the .exe). - MCPP_VERSION: "0.0.79" + MCPP_VERSION: "0.0.81" jobs: lint: @@ -111,20 +111,20 @@ jobs: include: - platform: linux os: ubuntu-latest - archive: mcpp-0.0.79-linux-x86_64.tar.gz - root: mcpp-0.0.79-linux-x86_64 + archive: mcpp-0.0.81-linux-x86_64.tar.gz + root: mcpp-0.0.81-linux-x86_64 mcpp: bin/mcpp xlings: registry/bin/xlings - platform: macos os: macos-15 - archive: mcpp-0.0.79-macosx-arm64.tar.gz - root: mcpp-0.0.79-macosx-arm64 + archive: mcpp-0.0.81-macosx-arm64.tar.gz + root: mcpp-0.0.81-macosx-arm64 mcpp: bin/mcpp xlings: registry/bin/xlings - platform: windows os: windows-latest - archive: mcpp-0.0.79-windows-x86_64.zip - root: mcpp-0.0.79-windows-x86_64 + archive: mcpp-0.0.81-windows-x86_64.zip + root: mcpp-0.0.81-windows-x86_64 mcpp: bin/mcpp.exe xlings: registry/bin/xlings.exe steps: