mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
Universal builds for Android armv8 and compatibility with older compilers
- We add a new path for supporting universal builds without #embed . `xxd` causes the compiler to run out of memory, so instead we embed it as a string literal created at compile time.
- This file is created in `net.sh`, and only if `--embed-dir` isn't supported + we are doing a universal build.
- This was necessary because Android NDK seems to not support embed, idk why
- A couple other Makefile tweaks were necessary for the Android path.
- While we're at it, remove the non-universal arm64 windows and android binaries.
closes https://github.com/official-stockfish/Stockfish/pull/6827
No functional change
This commit is contained in:
committed by
Joost VandeVondele
parent
319d61effd
commit
24abab9f6c
+11
-3
@@ -51,10 +51,18 @@ INCBIN(EmbeddedNNUE, EvalFileDefaultName);
|
||||
// separate, non-LTO nnue_embed.o (with strong symbols) can override them during the LTO link,
|
||||
// (INCBIN can't deduplicate.)
|
||||
#define WEAK_SYM __attribute__((weak))
|
||||
extern const unsigned char gEmbeddedNNUEData[] WEAK_SYM = {
|
||||
#embed EvalFileDefaultName
|
||||
extern const unsigned char gEmbeddedNNUEData[] WEAK_SYM =
|
||||
#ifdef __has_embed
|
||||
{
|
||||
#embed EvalFileDefaultName
|
||||
};
|
||||
extern const unsigned int gEmbeddedNNUESize WEAK_SYM = sizeof(gEmbeddedNNUEData);
|
||||
const int padding = 0;
|
||||
#else
|
||||
#include "../universal/network_dump.inc"
|
||||
;
|
||||
const int padding = 1; // trailing NUL byte
|
||||
#endif
|
||||
extern const unsigned int gEmbeddedNNUESize WEAK_SYM = sizeof(gEmbeddedNNUEData) - padding;
|
||||
#else
|
||||
const unsigned char gEmbeddedNNUEData[1] = {0x0};
|
||||
const unsigned int gEmbeddedNNUESize = 1;
|
||||
|
||||
Reference in New Issue
Block a user