Commit dd9dd6204c for openssl.org

commit dd9dd6204c565e938bfe81e7115c642346b64567
Author: Richard Levitte <levitte@openssl.foundation>
Date:   Tue Sep 1 19:16:13 2026 +0200

    cmake config test: match VS platform to target arch

    With Visual Studio generators, cmake defaults to building for x64.
    When the OpenSSL build itself is 32-bit (VC-WIN32) or ARM64, the
    dummy programs end up built for the wrong architecture and fail to
    link against the OpenSSL libraries, as seen in the shared x86
    Windows CI job:

        warning LNK4272: library machine type 'x86' conflicts with
        target machine type 'x64'

    Select the generator platform matching the configured target.

    Assisted-by: Pi:moonshotai/kimi-k3
    Signed-off-by: Richard Levitte <levitte@openssl.foundation>
    Reviewed-by: Andrew Dinh <andrewd@openssl.org>
    Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
    Merge-date: Sat Nov 14 17:36:40 2026
    Merged-from: https://github.com/openssl/openssl/pull/32442

diff --git a/test/recipes/94-test_cmake_config.t b/test/recipes/94-test_cmake_config.t
index efb2f10b5d..d6e4429a02 100644
--- a/test/recipes/94-test_cmake_config.t
+++ b/test/recipes/94-test_cmake_config.t
@@ -55,6 +55,13 @@ my @cmake_configure =
      # The dummy programs are run through the same wrapper that the rest
      # of the test suite uses, so the loader path is set up for them
      "-DOPENSSL_WRAP_PL=" . abs_path(bldtop_file("util", "wrap.pl")));
+# With Visual Studio generators, cmake defaults to the x64 platform.
+# The dummy programs must match the architecture of the OpenSSL build,
+# so say it explicitly when it deviates from that default.
+push @cmake_configure, "-A", "Win32"
+    if config('target') =~ /^VC-WIN32/;
+push @cmake_configure, "-A", "ARM64"
+    if config('target') =~ /^VC-WIN64-ARM/;
 push @cmake_configure, "-DTEST_LEGACY_PROVIDER=OFF"
     if disabled("legacy") || disabled("module");