Skip to content

Commit

Permalink
Remove BLAKE3 submodule
Browse files Browse the repository at this point in the history
BLAKE3 is not used. This commit removes build flags associated with blake3
and removes the git submodule.
  • Loading branch information
Virus-Axel committed Nov 29, 2023
1 parent 0dff7c4 commit a0e4966
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 20 deletions.
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
path = godot-cpp
url = https://github.com/godotengine/godot-cpp
branch = 4.1
[submodule "BLAKE3"]
path = BLAKE3
url = [email protected]:BLAKE3-team/BLAKE3.git
ignore=untracked
[submodule "ed25519"]
path = ed25519
url = [email protected]:orlp/ed25519.git
Expand Down
1 change: 0 additions & 1 deletion BLAKE3
Submodule BLAKE3 deleted from 5aa53f
16 changes: 2 additions & 14 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -118,25 +118,13 @@ env = SConscript("godot-cpp/SConstruct")
env.Append(CPPPATH=["src/"])
env.Append(CPPPATH=["include/"])
env.Append(CPPPATH=["sha256/"])
env.Append(CPPPATH=["BLAKE3/c/"])
env.Append(CPPPATH=["ed25519/src/"])
env.Append(CPPPATH=["phantom/"])
env.Append(CPPPATH=["instructions/include"])
env.Append(CPPPATH=["instructions/src"])
env.Append(CCFLAGS=[
"-DBLAKE3_NO_SSE41",
"-DBLAKE3_NO_SSE2",
"-DBLAKE3_NO_AVX512",
"-DBLAKE3_NO_AVX2",
"-DBLAKE3_USE_NEON=0",
])

sources = Glob("src/*.cpp")

blak3_sources = Glob("BLAKE3/c/blake3.c")
blak3_sources.append(Glob("BLAKE3/c/blake3_dispatch.c")[0])
blak3_sources.append(Glob("BLAKE3/c/blake3_portable.c")[0])

sha256_sources = Glob("sha256/sha256.cpp")
ed25519_sources = Glob("ed25519/src/*.c")

Expand Down Expand Up @@ -178,12 +166,12 @@ else:
) + LIBRARY_NAME + ".{}.{}".format(
env["platform"], env["target"]
),
source=sources + blak3_sources + sha256_sources + ed25519_sources + phantom_sources + instruction_sources,
source=sources + sha256_sources + ed25519_sources + phantom_sources + instruction_sources,
)
else:
library = env.SharedLibrary(
"bin/lib" + LIBRARY_NAME + "{}{}".format(env["suffix"], env["SHLIBSUFFIX"]),
source=sources + blak3_sources + sha256_sources + ed25519_sources + phantom_sources + instruction_sources,
source=sources + sha256_sources + ed25519_sources + phantom_sources + instruction_sources,
)

Default(library)
1 change: 0 additions & 1 deletion src/pubkey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

#include <solana_sdk.hpp>
#include <godot_cpp/core/class_db.hpp>
#include "blake3.h"
#include "sha256.hpp"

#include "curve25519.hpp"
Expand Down

0 comments on commit a0e4966

Please sign in to comment.