跳到主要内容

Clang 现已作为所有平台的编译器提供

我们每个平台的编译器堆栈通常使用该平台的“默认”编译器,例如,请参阅此处

实际上,这意味着

c_compiler:
- gcc # [linux]
- clang # [osx]
- vs2019 # [win]
cxx_compiler:
- gxx # [linux]
- clangxx # [osx]
- vs2019 # [win]

是 C/C++ 编译器的唯一可能选择。

最近,我们完成了添加初步支持,将 clang / clangxx 作为 C/C++ 编译器,也支持 linux 和 windows,从 clang 18 开始。这仍然是非常新的功能,所以可能存在 bug,我们要求除非有令人信服的理由,否则不要更改 feedstock 上的默认编译器。

无论如何,现在可以在 recipe/conda_build_config.yaml 中使用以下配置(注意缺少平台选择器)

c_compiler:
- clang
c_compiler_version:
- 18
cxx_compiler:
- clangxx
cxx_compiler_version:
- 18