mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 01:29:36 +00:00
Export makefile ARCH in binary
Example of the `./stockfish compiler` command: Compiled by : g++ (GNUC) 10.3.0 on Apple Compilation architecture : x86-64-bmi2 Compilation settings : 64bit BMI2 AVX2 SSE41 SSSE3 SSE2 POPCNT Compiler __VERSION__ macro : 10.3.0 closes https://github.com/official-stockfish/Stockfish/pull/4789 no functional change
This commit is contained in:
parent
708319a433
commit
e594aa7429
2 changed files with 17 additions and 4 deletions
|
@ -715,6 +715,11 @@ ifneq ($(GIT_DATE), )
|
||||||
CXXFLAGS += -DGIT_DATE=$(GIT_DATE)
|
CXXFLAGS += -DGIT_DATE=$(GIT_DATE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
### 3.7.3 Try to include architecture
|
||||||
|
ifneq ($(ARCH), )
|
||||||
|
CXXFLAGS += -DARCH=$(ARCH)
|
||||||
|
endif
|
||||||
|
|
||||||
### 3.8 Link Time Optimization
|
### 3.8 Link Time Optimization
|
||||||
### This is a mix of compile and link time options because the lto link phase
|
### This is a mix of compile and link time options because the lto link phase
|
||||||
### needs access to the optimization flags.
|
### needs access to the optimization flags.
|
||||||
|
|
16
src/misc.cpp
16
src/misc.cpp
|
@ -200,7 +200,7 @@ std::string compiler_info() {
|
||||||
/// _WIN32 Building on Windows (any)
|
/// _WIN32 Building on Windows (any)
|
||||||
/// _WIN64 Building on Windows 64 bit
|
/// _WIN64 Building on Windows 64 bit
|
||||||
|
|
||||||
std::string compiler = "\nCompiled by ";
|
std::string compiler = "\nCompiled by : ";
|
||||||
|
|
||||||
#if defined(__INTEL_LLVM_COMPILER)
|
#if defined(__INTEL_LLVM_COMPILER)
|
||||||
compiler += "ICX ";
|
compiler += "ICX ";
|
||||||
|
@ -253,8 +253,15 @@ std::string compiler_info() {
|
||||||
compiler += " on unknown system";
|
compiler += " on unknown system";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
compiler += "\nCompilation settings include: ";
|
compiler += "\nCompilation architecture : ";
|
||||||
compiler += (Is64Bit ? " 64bit" : " 32bit");
|
#if defined(ARCH)
|
||||||
|
compiler += stringify(ARCH);
|
||||||
|
#else
|
||||||
|
compiler += "(undefined architecture)";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
compiler += "\nCompilation settings : ";
|
||||||
|
compiler += (Is64Bit ? "64bit" : "32bit");
|
||||||
#if defined(USE_VNNI)
|
#if defined(USE_VNNI)
|
||||||
compiler += " VNNI";
|
compiler += " VNNI";
|
||||||
#endif
|
#endif
|
||||||
|
@ -288,12 +295,13 @@ std::string compiler_info() {
|
||||||
compiler += " DEBUG";
|
compiler += " DEBUG";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
compiler += "\n__VERSION__ macro expands to: ";
|
compiler += "\nCompiler __VERSION__ macro : ";
|
||||||
#ifdef __VERSION__
|
#ifdef __VERSION__
|
||||||
compiler += __VERSION__;
|
compiler += __VERSION__;
|
||||||
#else
|
#else
|
||||||
compiler += "(undefined macro)";
|
compiler += "(undefined macro)";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
compiler += "\n";
|
compiler += "\n";
|
||||||
|
|
||||||
return compiler;
|
return compiler;
|
||||||
|
|
Loading…
Add table
Reference in a new issue