Skip to content

Commit 9acf958

Browse files
committed
attempt blake3 msvc compilation
untested.. guess the bots at github will tell me
1 parent 1fcf8e9 commit 9acf958

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

ext/hash/config.w32

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ PHP_HASH = 'yes';
1111
EXTENSION('hash', 'hash.c hash_md.c hash_sha.c hash_ripemd.c hash_haval.c ' +
1212
'hash_tiger.c hash_gost.c hash_snefru.c hash_whirlpool.c ' +
1313
'hash_adler32.c hash_crc32.c hash_joaat.c hash_fnv.c ' +
14-
'hash_sha3.c', false);
14+
'hash_sha3.c hash_blake3.c blake3/blake3.c ' +
15+
'blake3/blake3_dispatch.c blake3/blake3_portable.c', false);
1516

1617
var hash_sha3_dir = 'ext/hash/sha3/generic' + (X64 ? '64' : '32') + 'lc';
1718

@@ -26,9 +27,11 @@ if (!CHECK_HEADER_ADD_INCLUDE('KeccakHash.h', 'CFLAGS_HASH', hash_sha3_dir)) {
2627
ERROR('Unable to locate SHA3 headers');
2728
}
2829

29-
ADD_FLAG('CFLAGS_HASH', '/DKeccakP200_excluded /DKeccakP400_excluded /DKeccakP800_excluded /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1');
30+
ADD_FLAG('CFLAGS_HASH', '/DKeccakP200_excluded /DKeccakP400_excluded /DKeccakP800_excluded /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 ' +
31+
'/DBLAKE3_NO_SSE2 /DBLAKE3_NO_SSE41 /DBLAKE3_NO_AVX2 /DBLAKE3_NO_AVX512');
3032

3133
PHP_INSTALL_HEADERS('ext/hash/', 'php_hash.h php_hash_md.h php_hash_sha.h ' +
3234
'php_hash_ripemd.h php_hash_haval.h php_hash_tiger.h ' +
3335
'php_hash_gost.h php_hash_snefru.h php_hash_whirlpool.h ' +
34-
'php_hash_adler32.h php_hash_crc32.h php_hash_sha3.h');
36+
'php_hash_adler32.h php_hash_crc32.h php_hash_sha3.h ' +
37+
'php_hash_blake3.h');

0 commit comments

Comments
 (0)