]> git.sesse.net Git - stockfish/commitdiff
Restore development version (revert previous commit)
authorStéphane Nicolet <cassio@free.fr>
Thu, 26 Sep 2019 21:19:31 +0000 (23:19 +0200)
committerStéphane Nicolet <cassio@free.fr>
Thu, 26 Sep 2019 21:27:48 +0000 (23:27 +0200)
Revert the previous patch now that the binary for the super-final
of TCEC season 16 has been sent.

Maybe the feature of showing the name of compiler will be added to the
master branch in the future. But we may use a cleaner way to code it, see
some ideas using the Makefile approach at the end of pull request #2327 :
https://github.com/official-stockfish/Stockfish/pull/2327

Bench: 3618154

src/misc.cpp
src/misc.h
src/uci.cpp

index a5717e7a18553e578daf2ff5d486ef4ad64a19e5..b1539ce20ea5d8e9d5d606154932c7f4df89c900 100644 (file)
@@ -144,77 +144,6 @@ const string engine_info(bool to_uci) {
 }
 
 
-/// compiler_info() returns a string trying to describe the compiler we use
-
-const std::string compiler_info() {
-
-  #define STRINGIFY2(x) #x
-  #define STRINGIFY(x) STRINGIFY2(x)
-  #define VER_STRING(major, minor, patch) STRINGIFY(major) "." STRINGIFY(minor) "." STRINGIFY(patch)
-
-/// Predefined macros hell:
-///
-/// __GNUC__           Compiler is gcc, Clang or Intel on Linux
-/// __INTEL_COMPILER   Compiler is Intel
-/// _MSC_VER           Compiler is MSVC or Intel on Windows
-/// _WIN32             Building on Windows (any)
-/// _WIN64             Building on Windows 64 bit
-
-  std::string compiler = "\nCompiled by ";
-
-  #ifdef __clang__
-     compiler += "clang++ ";
-     compiler += VER_STRING(__clang_major__, __clang_minor__, __clang_patchlevel__);
-  #elif __INTEL_COMPILER
-     compiler += "Intel compiler ";
-     compiler += "(version ";
-     compiler += STRINGIFY(__INTEL_COMPILER) " update " STRINGIFY(__INTEL_COMPILER_UPDATE);
-     compiler += ")";
-  #elif _MSC_VER
-     compiler += "MSVC ";
-     compiler += "(version ";
-     compiler += STRINGIFY(_MSC_FULL_VER) "." STRINGIFY(_MSC_BUILD);
-     compiler += ")";
-  #elif __GNUC__
-     compiler += "g++ (GNUC) ";
-     compiler += VER_STRING(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__);
-  #else
-     compiler += "Unknown compiler ";
-     compiler += "(unknown version)";
-  #endif
-
-  #if defined(__APPLE__) 
-     compiler += " on Apple";
-  #elif defined(__CYGWIN__)
-     compiler += " on Cygwin";
-  #elif defined(__MINGW64__)
-     compiler += " on MinGW64";
-  #elif defined(__MINGW32__)
-     compiler += " on MinGW32";
-  #elif defined(__ANDROID__)
-     compiler += " on Android";
-  #elif defined(__linux__)
-     compiler += " on Linux";
-  #elif defined(_WIN64)
-     compiler += " on Microsoft Windows 64-bit";
-  #elif defined(_WIN32)
-     compiler += " on Microsoft Windows 32-bit";
-  #else
-     compiler += " on unknown system";
-  #endif
-
-  compiler += "\n __VERSION__ macro expands to: ";
-  #ifdef __VERSION__
-     compiler += __VERSION__;
-  #else
-     compiler += "(undefined macro)";
-  #endif
-  compiler += "\n";
-
-  return compiler;
-}
-
-
 /// Debug functions used mainly to collect run-time statistics
 static std::atomic<int64_t> hits[2], means[2];
 
index 0efdd562e1d168080e68f3bc51f1ded7d8eb7468..ddd05e4e13d56dc67a829cbf08bc07504e945505 100644 (file)
@@ -30,7 +30,6 @@
 #include "types.h"
 
 const std::string engine_info(bool to_uci = false);
-const std::string compiler_info();
 void prefetch(void* addr);
 void start_logger(const std::string& fname);
 
index 6e560572dd9c0d6b3529859e34de4f893beaf263..a4235f2b23fb601c535f91c33f4d7c1b0ab36f77 100644 (file)
@@ -230,11 +230,10 @@ void UCI::loop(int argc, char* argv[]) {
       else if (token == "isready")    sync_cout << "readyok" << sync_endl;
 
       // Additional custom non-UCI commands, mainly for debugging
-      else if (token == "flip")     pos.flip();
-      else if (token == "bench")    bench(pos, is, states);
-      else if (token == "d")        sync_cout << pos << sync_endl;
-      else if (token == "eval")     sync_cout << Eval::trace(pos) << sync_endl;
-      else if (token == "compiler") sync_cout << compiler_info() << sync_endl;
+      else if (token == "flip")  pos.flip();
+      else if (token == "bench") bench(pos, is, states);
+      else if (token == "d")     sync_cout << pos << sync_endl;
+      else if (token == "eval")  sync_cout << Eval::trace(pos) << sync_endl;
       else
           sync_cout << "Unknown command: " << cmd << sync_endl;