Try to move to MinGW builds on Windows
This commit is contained in:
parent
8de748fa65
commit
2a40277cf9
2 changed files with 14 additions and 23 deletions
7
.github/workflows/deploy.yml
vendored
7
.github/workflows/deploy.yml
vendored
|
@ -16,11 +16,8 @@ jobs:
|
||||||
run: git clone https://github.com/xmrig/xmrig-deps.git
|
run: git clone https://github.com/xmrig/xmrig-deps.git
|
||||||
- name: Build project on Windows
|
- name: Build project on Windows
|
||||||
run: |
|
run: |
|
||||||
cmake . -G "Visual Studio 16 2019" -DXMRIG_DEPS=xmrig-deps\msvc2019\x64
|
cmake . -G "MinGW Makefiles" -DXMRIG_DEPS=xmrig-deps\gcc\x64
|
||||||
cd "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Current\Bin"
|
make -j%NUMBER_OF_PROCESSORS%
|
||||||
.\MSBuild.exe /p:Configuration=Release $Env:GITHUB_WORKSPACE\xmrig.sln
|
|
||||||
cd $Env:GITHUB_WORKSPACE
|
|
||||||
copy Release\xmrig.exe .
|
|
||||||
copy src\config.json .
|
copy src\config.json .
|
||||||
copy bin\WinRing0\WinRing0x64.sys .
|
copy bin\WinRing0\WinRing0x64.sys .
|
||||||
7z a -tzip -mx windows_build.zip xmrig.exe config.json WinRing0x64.sys
|
7z a -tzip -mx windows_build.zip xmrig.exe config.json WinRing0x64.sys
|
||||||
|
|
|
@ -34,12 +34,6 @@
|
||||||
|
|
||||||
#include "sha256.h"
|
#include "sha256.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
#define static_restrict(n)
|
|
||||||
#else
|
|
||||||
#define static_restrict(n) static restrict n
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __ICC
|
#ifdef __ICC
|
||||||
/* Miscompile with icc 14.0.0 (at least), so don't use restrict there */
|
/* Miscompile with icc 14.0.0 (at least), so don't use restrict there */
|
||||||
#define restrict
|
#define restrict
|
||||||
|
@ -138,9 +132,9 @@ static const uint32_t Krnd[64] = {
|
||||||
* the 512-bit input block to produce a new state.
|
* the 512-bit input block to produce a new state.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
SHA256_Transform(uint32_t state[static_restrict(8)],
|
SHA256_Transform(uint32_t state[static restrict 8],
|
||||||
const uint8_t block[static_restrict(64)],
|
const uint8_t block[static restrict 64],
|
||||||
uint32_t W[static_restrict(64)], uint32_t S[static_restrict(8)])
|
uint32_t W[static restrict 64], uint32_t S[static restrict 8])
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
@ -209,7 +203,7 @@ static const uint8_t PAD[64] = {
|
||||||
|
|
||||||
/* Add padding and terminating bit-count. */
|
/* Add padding and terminating bit-count. */
|
||||||
static void
|
static void
|
||||||
SHA256_Pad(SHA256_CTX * ctx, uint32_t tmp32[static_restrict(72)])
|
SHA256_Pad(SHA256_CTX * ctx, uint32_t tmp32[static restrict 72])
|
||||||
{
|
{
|
||||||
size_t r;
|
size_t r;
|
||||||
|
|
||||||
|
@ -263,7 +257,7 @@ SHA256_Init(SHA256_CTX * ctx)
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_SHA256_Update(SHA256_CTX * ctx, const void * in, size_t len,
|
_SHA256_Update(SHA256_CTX * ctx, const void * in, size_t len,
|
||||||
uint32_t tmp32[static_restrict(72)])
|
uint32_t tmp32[static restrict 72])
|
||||||
{
|
{
|
||||||
uint32_t r;
|
uint32_t r;
|
||||||
const uint8_t * src = in;
|
const uint8_t * src = in;
|
||||||
|
@ -321,7 +315,7 @@ SHA256_Update(SHA256_CTX * ctx, const void * in, size_t len)
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_SHA256_Final(uint8_t digest[32], SHA256_CTX * ctx,
|
_SHA256_Final(uint8_t digest[32], SHA256_CTX * ctx,
|
||||||
uint32_t tmp32[static_restrict(72)])
|
uint32_t tmp32[static restrict 72])
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Add padding. */
|
/* Add padding. */
|
||||||
|
@ -373,8 +367,8 @@ SHA256_Buf(const void * in, size_t len, uint8_t digest[32])
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_HMAC_SHA256_Init(HMAC_SHA256_CTX * ctx, const void * _K, size_t Klen,
|
_HMAC_SHA256_Init(HMAC_SHA256_CTX * ctx, const void * _K, size_t Klen,
|
||||||
uint32_t tmp32[static_restrict(72)], uint8_t pad[static_restrict(64)],
|
uint32_t tmp32[static restrict 72], uint8_t pad[static restrict 64],
|
||||||
uint8_t khash[static_restrict(32)])
|
uint8_t khash[static restrict 32])
|
||||||
{
|
{
|
||||||
const uint8_t * K = _K;
|
const uint8_t * K = _K;
|
||||||
size_t i;
|
size_t i;
|
||||||
|
@ -426,7 +420,7 @@ HMAC_SHA256_Init(HMAC_SHA256_CTX * ctx, const void * _K, size_t Klen)
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_HMAC_SHA256_Update(HMAC_SHA256_CTX * ctx, const void * in, size_t len,
|
_HMAC_SHA256_Update(HMAC_SHA256_CTX * ctx, const void * in, size_t len,
|
||||||
uint32_t tmp32[static_restrict(72)])
|
uint32_t tmp32[static restrict 72])
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Feed data to the inner SHA256 operation. */
|
/* Feed data to the inner SHA256 operation. */
|
||||||
|
@ -453,7 +447,7 @@ HMAC_SHA256_Update(HMAC_SHA256_CTX * ctx, const void * in, size_t len)
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
_HMAC_SHA256_Final(uint8_t digest[32], HMAC_SHA256_CTX * ctx,
|
_HMAC_SHA256_Final(uint8_t digest[32], HMAC_SHA256_CTX * ctx,
|
||||||
uint32_t tmp32[static_restrict(72)], uint8_t ihash[static_restrict(32)])
|
uint32_t tmp32[static restrict 72], uint8_t ihash[static restrict 32])
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Finish the inner SHA256 operation. */
|
/* Finish the inner SHA256 operation. */
|
||||||
|
@ -506,8 +500,8 @@ HMAC_SHA256_Buf(const void * K, size_t Klen, const void * in, size_t len,
|
||||||
|
|
||||||
/* Add padding and terminating bit-count, but don't invoke Transform yet. */
|
/* Add padding and terminating bit-count, but don't invoke Transform yet. */
|
||||||
static int
|
static int
|
||||||
SHA256_Pad_Almost(SHA256_CTX * ctx, uint8_t len[static_restrict(8)],
|
SHA256_Pad_Almost(SHA256_CTX * ctx, uint8_t len[static restrict 8],
|
||||||
uint32_t tmp32[static_restrict(72)])
|
uint32_t tmp32[static restrict 72])
|
||||||
{
|
{
|
||||||
uint32_t r;
|
uint32_t r;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue