--- a/client/cs_platforms.cpp
+++ b/client/cs_platforms.cpp
@@ -174,6 +174,21 @@ int launch_child_process_to_detect_emula
 //
 void CLIENT_STATE::detect_platforms() {
 
+// if specified - use it
+#ifdef HOSTTYPE
+    add_platform(HOSTTYPE);
+#endif
+
+// if specified - use it
+#ifdef HOSTTYPEALT
+    add_platform(HOSTTYPEALT);
+#endif
+
+// if both the hosttype and its alternative are specified,
+// there is no need to look further and one should go directly
+// to the inspection of the cc_config.xml data
+#if !defined(HOSTTYPE) || !defined(HOSTTYPEALT)
+
 #if defined(_WIN32) && !defined(__CYGWIN32__)
 #if defined(_ARM64_)
     add_platform("windows_arm64");
@@ -326,15 +341,6 @@ void CLIENT_STATE::detect_platforms() {
         add_platform("i686-pc-linux-gnu");
     }
 
-    if (!(support64 || support32)) {
-        // Something went wrong. Assume HOSTTYPE and HOSTTYPEALT
-        // are correct
-        add_platform(HOSTTYPE);
-#ifdef HOSTTYPEALT
-        add_platform(HOSTTYPEALT);
-#endif
-    }
-
 #elif defined(sun)
     // Check if we can run 64-bit binaries...
     // this assumes there isn't a 64-bit only solaris.  (Every 64-bit solaris can run 32 bit binaries)
@@ -410,6 +416,8 @@ void CLIENT_STATE::detect_platforms() {
 #endif
 
 #endif
+
+#endif
 
     if (cc_config.no_alt_platform) {
         PLATFORM p = platforms[0];
