Add cpp module artifact name pattern

Copybara Import from https://github.com/bazelbuild/rules_cc/pull/429

BEGIN_PUBLIC
Add cpp module artifact name pattern (#429)

see https://github.com/bazelbuild/bazel/pull/22553#discussion_r2169206515

Closes #429
END_PUBLIC

COPYBARA_INTEGRATE_REVIEW=https://github.com/bazelbuild/rules_cc/pull/429 from PikachuHyA:artifact_name_pattern edaaf4f226789ef7d3b10775b4370d9e3cc51b93
PiperOrigin-RevId: 781091471
Change-Id: Ic119cf2c87ec55e8e063d358640512c48c3b4667
diff --git a/cc/private/toolchain/unix_cc_toolchain_config.bzl b/cc/private/toolchain/unix_cc_toolchain_config.bzl
index ed61d2e..225c1c1 100644
--- a/cc/private/toolchain/unix_cc_toolchain_config.bzl
+++ b/cc/private/toolchain/unix_cc_toolchain_config.bzl
@@ -1779,7 +1779,13 @@
     # TODO(#8303): Mac crosstool should also declare every feature.
     if is_linux:
         # Linux artifact name patterns are the default.
-        artifact_name_patterns = []
+        artifact_name_patterns = [
+            artifact_name_pattern(
+                category_name = "cpp_module",
+                prefix = "",
+                extension = ".pcm",
+            ),
+        ]
         features = [
             cpp_modules_feature,
             cpp_module_modmap_file_feature,