小编Mom*_*omo的帖子

为什么 March=native 在 Apple M1 上不起作用?

每当我尝试march=native在带有 M1 芯片的 Macbook 上编译任何 C++ 程序时,使用 clang 时都会出现以下错误:

clang: error: the clang compiler does not support '-march=native'
Run Code Online (Sandbox Code Playgroud)

但是,它曾经适用于配备 Intel CPU 的旧款 Macbook。clang 不支持这种架构(还)吗?

clang --version 给出:

Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: arm64-apple-darwin20.2.0
Run Code Online (Sandbox Code Playgroud)

c c++ compiler-errors compilation

6
推荐指数
4
解决办法
2646
查看次数

标签 统计

c ×1

c++ ×1

compilation ×1

compiler-errors ×1