mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
[BETA] macOS support
This commit is contained in:
parent
ec56576a88
commit
2ab5bcf93d
32 changed files with 393 additions and 1386 deletions
|
|
@ -19,33 +19,37 @@ if CONFIG['CPU_ARCH'] == 'arm':
|
|||
]
|
||||
|
||||
if CONFIG['INTEL_ARCHITECTURE']:
|
||||
DEFINES['ADLER32_SIMD_SSSE3'] = True
|
||||
DEFINES['INFLATE_CHUNK_SIMD_SSE2'] = True
|
||||
DEFINES['CRC32_SIMD_SSE42_PCLMUL'] = True
|
||||
SOURCES += [
|
||||
'adler32_simd.c',
|
||||
'crc32_simd.c',
|
||||
'crc_folding.c',
|
||||
'fill_window_sse.c',
|
||||
'inffast_chunk.c',
|
||||
'inflate_simd.c',
|
||||
'x86.c',
|
||||
]
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'Darwin':
|
||||
# Keep SIMD/chunkcopy paths disabled on Darwin, but provide fallback
|
||||
# helper symbols used by crc32/deflate call sites.
|
||||
DEFINES['ADLER32_SIMD_SSSE3'] = False
|
||||
DEFINES['INFLATE_CHUNK_SIMD_SSE2'] = False
|
||||
DEFINES['CRC32_SIMD_SSE42_PCLMUL'] = False
|
||||
SOURCES += [
|
||||
'simd_darwin_stub.c',
|
||||
]
|
||||
else:
|
||||
SOURCES += [
|
||||
'adler32_simd.c',
|
||||
'crc32_simd.c',
|
||||
'crc_folding.c',
|
||||
'fill_window_sse.c',
|
||||
'inffast_chunk.c',
|
||||
'inflate_simd.c',
|
||||
]
|
||||
else:
|
||||
SOURCES += [
|
||||
'simd_stub.c',
|
||||
]
|
||||
|
||||
if CONFIG['CPU_ARCH'] != 'arm' and not CONFIG['INTEL_ARCHITECTURE']:
|
||||
SOURCES += [
|
||||
'inflate.c',
|
||||
]
|
||||
|
||||
if CONFIG['ZLIB_IN_MOZGLUE']:
|
||||
FINAL_LIBRARY = 'mozglue'
|
||||
DEFINES['IMPL_MFBT'] = True
|
||||
else:
|
||||
# The final library is in config/external/zlib
|
||||
FINAL_LIBRARY = 'zlib'
|
||||
|
||||
SOURCES += [
|
||||
|
|
@ -59,8 +63,10 @@ SOURCES += [
|
|||
'gzwrite.c',
|
||||
'infback.c',
|
||||
'inffast.c',
|
||||
'inflate.c',
|
||||
'inftrees.c',
|
||||
'trees.c',
|
||||
'uncompr.c',
|
||||
'zutil.c',
|
||||
]
|
||||
|
||||
|
|
|
|||
30
modules/zlib/src/simd_darwin_stub.c
Normal file
30
modules/zlib/src/simd_darwin_stub.c
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include <assert.h>
|
||||
|
||||
#include "deflate.h"
|
||||
|
||||
void ZLIB_INTERNAL crc_fold_init(deflate_state *const s) {
|
||||
(void)s;
|
||||
assert(0);
|
||||
}
|
||||
|
||||
void ZLIB_INTERNAL crc_fold_copy(deflate_state *const s,
|
||||
unsigned char *dst,
|
||||
const unsigned char *src,
|
||||
long len) {
|
||||
(void)s;
|
||||
(void)dst;
|
||||
(void)src;
|
||||
(void)len;
|
||||
assert(0);
|
||||
}
|
||||
|
||||
unsigned ZLIB_INTERNAL crc_fold_512to32(deflate_state *const s) {
|
||||
(void)s;
|
||||
assert(0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ZLIB_INTERNAL fill_window_sse(deflate_state *s) {
|
||||
(void)s;
|
||||
assert(0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue