@@ -120,15 +120,12 @@ foreach attr: [
120
120
endforeach
121
121
122
122
foreach opt : [
123
- [' unaligned' , ' Unaligned reads allowed' , [], [' -DNO_UNALIGNED' ]],
124
- [' inflate-strict' , ' Inflate strict distance checking' , [' -DINFLATE_STRICT' ], []],
125
- [' inflate-allow-invalid-dist' , ' Zero fill for inflate invalid distances' , [' -DINFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR' ], []],
123
+ [' inflate-strict' , ' Inflate strict distance checking' , [' -DINFLATE_STRICT' ]],
124
+ [' inflate-allow-invalid-dist' , ' Zero fill for inflate invalid distances' , [' -DINFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR' ]],
126
125
]
127
126
enable = get_option (opt[0 ])
128
127
if enable
129
128
compile_args += opt[2 ]
130
- else
131
- compile_args += opt[3 ]
132
129
endif
133
130
summary (opt[1 ], enable, section : general_section, bool_yn : true )
134
131
endforeach
@@ -804,7 +801,7 @@ elif cpu_family in ['x86', 'x86_64']
804
801
if cc_id == ' msvc'
805
802
avx2flags = [' /arch:AVX2' ]
806
803
else
807
- avx2flags = [' -mavx2' ]
804
+ avx2flags = [' -mavx2' , ' -mbmi2 ' ]
808
805
endif
809
806
want_avx2 = get_option (' avx2' ).require(have_sse42)
810
807
have_avx2 = want_avx2.allowed() and cc.compiles(
@@ -834,7 +831,7 @@ elif cpu_family in ['x86', 'x86_64']
834
831
if cc_id == ' msvc'
835
832
avx512flags = [' /arch:AVX512' ]
836
833
else
837
- avx512flags = [' -mavx512f' , ' -mavx512dq' , ' -mavx512bw' , ' -mavx512vl' ]
834
+ avx512flags = [' -mavx512f' , ' -mavx512dq' , ' -mavx512bw' , ' -mavx512vl' , ' -mbmi2 ' ]
838
835
# For CPUs that can benefit from AVX512, it seems GCC generates suboptimal
839
836
# instruction scheduling unless you specify a reasonable -mtune= target
840
837
foreach mtune : [' -mtune=cascadelake' , ' -mtune=skylake-avx512' ]
@@ -859,6 +856,7 @@ elif cpu_family in ['x86', 'x86_64']
859
856
arch_libs += static_library (
860
857
' avx512' ,
861
858
archdir / ' adler32_avx512.c' ,
859
+ archdir / ' chunkset_avx512.c' ,
862
860
c_args : compile_args + avx512flags,
863
861
link_args : link_args,
864
862
)
@@ -869,7 +867,7 @@ elif cpu_family in ['x86', 'x86_64']
869
867
if cc_id == ' msvc'
870
868
avx512vnniflags = [' /arch:AVX512' ]
871
869
else
872
- avx512vnniflags = [' -mavx512f' , ' -mavx512dq' , ' -mavx512bw' , ' -mavx512vl' , ' -mavx512vnni' ]
870
+ avx512vnniflags = [' -mavx512f' , ' -mavx512dq' , ' -mavx512bw' , ' -mavx512vl' , ' -mavx512vnni' , ' -mbmi2 ' ]
873
871
# For CPUs that can benefit from AVX512, it seems GCC generates suboptimal
874
872
# instruction scheduling unless you specify a reasonable -mtune= target
875
873
foreach mtune : [' -mtune=cascadelake' , ' -mtune=skylake-avx512' ]
0 commit comments