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

Add announcement for clang support across platforms #2161

Merged
merged 6 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion news/2024-04-09-clang-everywhere.md
h-vetinari marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

36 changes: 36 additions & 0 deletions news/2024-04-30-clang-everywhere.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Clang now available as compiler for all platforms

Our compiler stack per platform generally uses the "default" compiler for that
platform, see e.g. [here](https://conda-forge.org/docs/maintainer/infrastructure/#compilers-and-runtimes).

In practice, this meant that
```
h-vetinari marked this conversation as resolved.
Show resolved Hide resolved
c_compiler:
- gcc # [linux]
- clang # [osx]
- vs2019 # [win]
cxx_compiler:
- gxx # [linux]
- clangxx # [osx]
- vs2019 # [win]
```
was the only possible choice for C/C++ compilers.

Recently, we finished adding preliminary support `clang` / `clangxx` as
C/C++ compilers also on osx and windows, starting from clang 18.
h-vetinari marked this conversation as resolved.
Show resolved Hide resolved
This is still very fresh, so bugs are possible, and we ask not to change
the default compilers on feedstocks unless there are compelling reasons.

In any case, it is now possible to use the following configuration in
`recipe/conda_build_config.yaml`:
```
h-vetinari marked this conversation as resolved.
Show resolved Hide resolved
# please consult @conda-forge/core before doing this
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My thinking was that we don't (yet?) want to make it a free-for-all for feedstocks to choose their compilers. I think the cautious choice would be to keep feedstocks on the default compilers unless there are good reasons for choosing clang, at least while we get some more experience with using clang on linux/win.

That line was meant as a kind of natural "brake" on people's enthusiasm in order to have a softer rollout, but if you feel that this caution is not necessary, I can remove that line.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My feeling is that people that choose clang as compiler either know what they are doing and thus don't need to spam core with more notifications or they are doing it as part of a copy/paste from another recipe, fail to apply it and will ping someone competent anyways. Thus, for the sake of a bit less notifications, I would omit it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@isuruf, I'm assuming your concern here is addressed now?

c_compiler:
- clang
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Open to add something like this:

Suggested change
- clang
# look ma, no selectors!
- clang

c_compiler_version:
- 18
cxx_compiler:
- clangxx
cxx_compiler_version:
- 18
```