diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8d503a4..d87a6f9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -90,11 +90,7 @@ jobs: - name: Build ${{matrix.configuration}} ${{matrix.arch}} binaries run: | pushd build - make config=${{matrix.config}}_${{matrix.arch}} -j$(nproc) - shell: bash - env: - CC: gcc-11 - CXX: g++-11 + ../tools/mold/mold -run make config=${{matrix.config}}_${{matrix.arch}} -j$(nproc) - name: Upload ${{matrix.configuration}} ${{matrix.arch}} binaries uses: actions/upload-artifact@v3.1.0 diff --git a/src/std_include.hpp b/src/std_include.hpp index 9d57908..bab852f 100644 --- a/src/std_include.hpp +++ b/src/std_include.hpp @@ -37,12 +37,6 @@ #else -#pragma GCC diagnostic push -#ifndef __APPLE__ -#pragma GCC diagnostic ignored "-Wbool-compare" -#endif -#pragma GCC diagnostic ignored "-Wlogical-not-parentheses" - #include #include #include @@ -91,6 +85,5 @@ #pragma comment(lib, "ws2_32.lib") #pragma comment(lib, "urlmon.lib" ) #pragma comment(lib, "iphlpapi.lib") -#else -#pragma GCC diagnostic pop + #endif diff --git a/src/utils/cryptography.cpp b/src/utils/cryptography.cpp index e75a605..e164f97 100644 --- a/src/utils/cryptography.cpp +++ b/src/utils/cryptography.cpp @@ -128,7 +128,7 @@ namespace utils::cryptography ecc::key::key() { - ZeroMemory(&this->key_storage_, sizeof(this->key_storage_)); + std::memset(&this->key_storage_, 0, sizeof(this->key_storage_)); } ecc::key::~key() @@ -153,7 +153,7 @@ namespace utils::cryptography if (this != &obj) { std::memmove(&this->key_storage_, &obj.key_storage_, sizeof(this->key_storage_)); - ZeroMemory(&obj.key_storage_, sizeof(obj.key_storage_)); + std::memset(&obj.key_storage_, 0, sizeof(obj.key_storage_)); } return *this; @@ -205,7 +205,7 @@ namespace utils::cryptography ul(pub_key_buffer.size()), &this->key_storage_) != CRYPT_OK) { - ZeroMemory(&this->key_storage_, sizeof(this->key_storage_)); + std::memset(&this->key_storage_, 0, sizeof(this->key_storage_)); } } @@ -217,7 +217,7 @@ namespace utils::cryptography &this->key_storage_) != CRYPT_OK ) { - ZeroMemory(&this->key_storage_, sizeof(this->key_storage_)); + std::memset(&this->key_storage_, 0, sizeof(this->key_storage_)); } } @@ -241,7 +241,7 @@ namespace utils::cryptography ecc_free(&this->key_storage_); } - ZeroMemory(&this->key_storage_, sizeof(this->key_storage_)); + std::memset(&this->key_storage_, 0, sizeof(this->key_storage_)); } bool ecc::key::operator==(key& key) const diff --git a/tools/mold/mold b/tools/mold/mold new file mode 100755 index 0000000..21cafb6 Binary files /dev/null and b/tools/mold/mold differ diff --git a/tools/mold/mold-wrapper.so b/tools/mold/mold-wrapper.so new file mode 100644 index 0000000..7a46546 Binary files /dev/null and b/tools/mold/mold-wrapper.so differ