With
cc="clang -march=native"
cxx="clang++ -march=native"
the build also succeeded.
My notebook is old. It supports avx2 but not avx512.
The current BUILD.gn
in the skia project doesn’t provide an options to disable avx512. I commented out the following lines in it but the zig compiler build still failed with the same errors.
# defines += [ "SK_ENABLE_AVX512_OPTS" ]
deps = [
...
#":skx",
...
]
After adding extra_cflags=["-DSKCMS_PORTABLE"]
as gn argument, the avx errors go, but some other new errors come. The new errors look related to some definitions. Strangely, clang build doesn’t need the definitions. I stopped here.