I have built the skia lib successfully with clang with the following config (although there are some AVX warnings).
bin/gn gen out/Static-m138 --args='
is_official_build=true
skia_enable_gpu=true
skia_use_system_expat=false
skia_use_system_freetype2=false
skia_use_system_harfbuzz=false
skia_use_system_icu=false
skia_use_system_libjpeg_turbo=false
skia_use_system_libpng=false
skia_use_system_libwebp=false
skia_use_system_zlib=false
cc="clang"
cxx="clang++"
'
However, when I replace the compilers with
cc="zig cc"
cxx="zig c++"
The build fails with many AVX errors:
...
../../modules/skcms/src/Transform_inl.h:884:9: error: AVX vector return of type 'float __attribute__((ext_vector_type(16)))' (vector of 16 'float' values) without 'evex512' enabled changes the ABI
884 | b = cast<F>(load_3<U32>(rgb+2) ) * (1/255.0f);
| ^
../../modules/skcms/src/Transform_inl.h:889:16: error: AVX vector return of type 'unsigned int __attribute__((ext_vector_type(16)))' (vector of 16 'unsigned int' values) without 'evex512' enabled changes the ABI
889 | U32 rgba = load<U32>(src + 4*i);
| ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
What extra options do I need to make the build with zig compiler succeed?