For Wasi build on windows, do not set CLR_CMAKE_TARGET_WIN32 (#86208)
authoryowl <scott.waye@hubse.com>
Sun, 14 May 2023 05:56:01 +0000 (00:56 -0500)
committerGitHub <noreply@github.com>
Sun, 14 May 2023 05:56:01 +0000 (22:56 -0700)
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
eng/native/configureplatform.cmake

index 192e3a3..2c47709 100644 (file)
@@ -461,10 +461,12 @@ if(CLR_CMAKE_TARGET_UNIX)
     else()
         clr_unknown_arch()
     endif()
-else()
-    set(CLR_CMAKE_TARGET_WIN32 1)
 endif(CLR_CMAKE_TARGET_UNIX)
 
+if(CLR_CMAKE_TARGET_OS STREQUAL windows)
+    set(CLR_CMAKE_TARGET_WIN32 1)
+endif()
+
 # check if host & target os/arch combination are valid
 if (NOT (CLR_CMAKE_TARGET_OS STREQUAL CLR_CMAKE_HOST_OS) AND NOT CLR_CMAKE_TARGET_WASI)
     if(NOT (CLR_CMAKE_HOST_OS STREQUAL windows))