这是这篇文章将 .cpp 文件转换为 .wasm 文件的后续问题
我正在尝试在 linux 上使用 emscripten 将我的 c++ 文件转换为 .wasm。我遇到了这个错误:
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/ia32intrin.h:188:10: error: use of undeclared identifier '__builtin_ia32_readeflags_u32'
return __builtin_ia32_readeflags_u32();
^
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/ia32intrin.h:194:3: error: use of undeclared identifier '__builtin_ia32_writeeflags_u32'
__builtin_ia32_writeeflags_u32(__f);
^
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/ia32intrin.h:284:10: error: use of undeclared identifier '__builtin_ia32_crc32qi'
return __builtin_ia32_crc32qi(__C, __D);
^
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/ia32intrin.h:305:10: error: use of undeclared identifier '__builtin_ia32_crc32hi'
return __builtin_ia32_crc32hi(__C, __D);
^
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/ia32intrin.h:326:10: error: use of undeclared identifier '__builtin_ia32_crc32si'
return __builtin_ia32_crc32si(__C, __D);
^
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/ia32intrin.h:354:10: error: use of undeclared identifier '__builtin_ia32_rdpmc'
return __builtin_ia32_rdpmc(__A);
^
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/ia32intrin.h:360:10: error: use of undeclared identifier '__builtin_ia32_rdtscp'
return __builtin_ia32_rdtscp(__A);
^
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/ia32intrin.h:369:3: error: use of undeclared identifier '__builtin_ia32_wbinvd'
__builtin_ia32_wbinvd();
^
In file included from sealdemo.cpp:1:
In file included from SEAL/native/src/seal/seal.h:6:
In file included from SEAL/native/src/seal/biguint.h:9:
In file included from SEAL/native/src/seal/memorymanager.h:10:
In file included from SEAL/native/src/seal/util/defines.h:62:
In file included from SEAL/native/src/seal/util/clang.h:18:
In file included from /home/maria/emsdk/upstream/lib/clang/10.0.0/include/x86intrin.h:15:
In file included from /home/maria/emsdk/upstream/lib/clang/10.0.0/include/immintrin.h:14:
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:33:5: error: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'?
__builtin_ia32_emms();
^
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:33:5: note: '__builtin_isless' declared here
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:33:25: error: too few arguments to function call, expected 2, have 0
__builtin_ia32_emms();
^
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:50:19: error: use of undeclared identifier '__builtin_ia32_vec_init_v2si'
return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
^
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:67:12: error: use of undeclared identifier '__builtin_ia32_vec_ext_v2si'
return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0);
^
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:129:19: error: use of undeclared identifier '__builtin_ia32_packsswb'
return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
^
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:159:19: error: use of undeclared identifier '__builtin_ia32_packssdw'
return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
^
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:189:19: error: use of undeclared identifier '__builtin_ia32_packuswb'
return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
^
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:216:19: error: use of undeclared identifier '__builtin_ia32_punpckhbw'
return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
^
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:239:19: error: use of undeclared identifier '__builtin_ia32_punpckhwd'
return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
^
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:260:19: error: use of undeclared identifier '__builtin_ia32_punpckhdq'
return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
^
/home/maria/emsdk/upstream/lib/clang/10.0.0/include/mmintrin.h:287:19: error: use of undeclared identifier '__builtin_ia32_punpcklbw'
return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
shared:ERROR: '/home/maria/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscrip
有人可以帮忙吗