Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何编译生成带intrinsic的llvm-ir, @llvm.riscv.xxx #94

Closed
lyuchuny3 opened this issue Jun 8, 2021 · 1 comment
Closed

如何编译生成带intrinsic的llvm-ir, @llvm.riscv.xxx #94

lyuchuny3 opened this issue Jun 8, 2021 · 1 comment

Comments

@lyuchuny3
Copy link

lyuchuny3 commented Jun 8, 2021

你好,

我看到目前前端clang从riscv intrinsic已经可以编译成llvm ir, 那么后端基于带riscv intrinsic的llvm ir (@llvm.riscv.xxx)可以顺利编译成RISCV 可执行文件吗, 编译命令 和 目标target参数如何设置呢

image

@luxufan
Copy link
Contributor

luxufan commented Jun 8, 2021

Hi,
您需要预先构建一套GNU的toolchain,这是链接: https://github.com/riscv/riscv-gnu-toolchain

随后clang 编译时带上参数: -gcc-toolchain="path to gnu toolchain" --sysroot="path to gnu sysroot"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants