首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >emcc无法在Mac OSX 10.15上运行,clang-10:错误未知参数:'-fignore-exceptions‘

emcc无法在Mac OSX 10.15上运行,clang-10:错误未知参数:'-fignore-exceptions‘
EN

Stack Overflow用户
提问于 2020-06-18 13:00:41
回答 1查看 434关注 0票数 2

我有一个简单的hello.c文件,包含以下内容:

代码语言:javascript
复制
#include <emscripten.h>
#include <stdlib.h>
#include <stdio.h>

int main() {
    printf("hello wasm\n");
}

我正在尝试使用emscripten emcc命令将其编译成.html,使用:

emcc hello.c --emrun -o hello.html

但我得到的输出是:

emcc: warning: LLVM version appears incorrect (seeing "10.0", expected "11.0") [-Wversion-check] clang-10: error: unknown argument: '-fignore-exceptions' emcc: error: '/usr/local/opt/llvm/bin/clang -target wasm32-unknown-emscripten -D__EMSCRIPTEN_major__=1 -D__EMSCRIPTEN_minor__=39 -D__EMSCRIPTEN_tiny__=18 -D_LIBCPP_ABI_VERSION=2 -Dunix -D__unix -D__unix__ -Werror=implicit-function-declaration -Xclang -nostdsysteminc -Xclang -isystem/usr/local/Cellar/emscripten/1.39.18/libexec/system/include/compat -Xclang -isystem/usr/local/Cellar/emscripten/1.39.18/libexec/system/include -Xclang -isystem/usr/local/Cellar/emscripten/1.39.18/libexec/system/include/libc -Xclang -isystem/usr/local/Cellar/emscripten/1.39.18/libexec/system/lib/libc/musl/arch/emscripten -Xclang -isystem/usr/local/Cellar/emscripten/1.39.18/libexec/system/local/include -Xclang -isystem/usr/local/Cellar/emscripten/1.39.18/libexec/system/include/SSE -Xclang -isystem/usr/local/Cellar/emscripten/1.39.18/libexec/cache/wasm/include -DEMSCRIPTEN -fignore-exceptions hello.c -Xclang -isystem/usr/local/Cellar/emscripten/1.39.18/libexec/system/include/SDL -c -o /var/folders/74/19dk0c293ps0fmfj5vsqld1w0000gn/T/emscripten_temp_xakv8jzi/hello_0.o -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr' failed (1)

我通过自制软件安装了emscripten和依赖项。以下是我的.zshrc中必需的导出:

export LLVM="/usr/local/opt/llvm/bin" export BINARYEN="/usr/local/opt/binaryen/bin"

我怎么才能让它工作呢?

EN

回答 1

Stack Overflow用户

发布于 2020-06-18 13:52:33

emscripten需要11vm的树尖(11)。它与LLVM10或任何其他稳定版本不兼容。安装emscripten和兼容版本的llvm的最简单方法是使用emsdk安装,而不是使用自制软件。

票数 4
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62442683

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档