-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show compiler info at startup #2327
Conversation
897f0b4
to
bae7cc8
Compare
This patch shows a description of the compiler used to compile Stockfish when starting from the console. Example of output: ``` Stockfish 240919 64 POPCNT by T. Romstad, M. Costalba, J. Kiiski, G. Linscott Compiled by clang++ 9.0.0 on Apple __VERSION__ macro expands to: 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.38) ``` No functional change
bae7cc8
to
baa9e17
Compare
We could use this to triple-check the compiler used for tournament binaries before submission. Of course, this is only to be used in the last few days before submissions, and my plan is to revert this just after the start of TCEC super-final. The patch is incomplete at this point because I can't test on Linux nor on Windows, any improvement appreciated. |
works here on windows
maybe we should keep this, but display this information only after some compilerinfo command |
Windows Subsystem for Linux
|
Same linux output for me. I like the idea of creating a compilerinfo command like eval, etc. Would allow us to do this at will without making and reverting commits. There is not much more time before the superfinal submission is needed now, the bonus round may finish about 36 hours from now (see Schedule tab). Quote from Aloril just now about superfinal start time (after a few hours of testing) - "Maybe in about 2 days 17min" ! |
As it is MSVC does not work well here
However after the following change:
I get a better output
|
EDIT_000 after 33c993b
|
Now you have to type the command in the console after launching Stockfish:
|
@Rocky640 Why is it a better output? I don't see the difference :-) |
Sorry, you should see the difference now, I edited by previous post. |
Thanks! |
After a296668
|
@xoto10 thanks, I was also looking at https://sourceforge.net/p/predef/wiki/OperatingSystems/ |
@snicolet Sorry for the late response. To my knowledge there is no such macro; the simplest approach I've seen online is to check whether /proc/version contains the string "Microsoft". It seems odd that there isn't one... |
This is how systemd does it: https://github.com/systemd/systemd/blob/a007d6fc2a2b9c19bafd6465fb4f00910b824c36/src/basic/virt.c#L466 |
OK, the systemd approach is too complicate for my taste, I will just report Linux. Can you check that it does that instead of reporting "unknown system"? |
After a6d5a8b
|
@ppigazzini Thanks for testing again :-) The output is now correct, is it? Ubuntu cross compilation and msys2 do use MinGW64 as shown? |
@snicolet yes
|
@snicolet here MinGW-w64 and Wine for your Mac :) |
@snicolet good catch 👍 |
How about a Makefile define approach, it is easier to get information with Usually projects do that with a |
@noobpwnftw Does anybody want to dig into the Makefile and look if this is feasible without a |
Merged via 0436f01, but I keep the pull request open, of course. |
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 : #2327 Bench: 3618154
Closing this pull request now that the development version has been restored in commit 8726beb. I may open another pull request for discussing a lighter Makefile approach, as suggested here. |
This patch shows a description of the compiler used to compile Stockfish when starting from the console.
Usage:
Example of output:
No functional change