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

Drop CA_RISCV_ENABLED CMake option. #684

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hvdijk
Copy link
Collaborator

@hvdijk hvdijk commented Feb 18, 2025

Overview

Drop CA_RISCV_ENABLED CMake option.

Reason for change

The CA_RISCV_ENABLED option was provided because we simultaneously want to enable all available Mux targets by default, and disable the RISC-V Mux target by default. This is confusing when CA_RISCV_ENABLED and CA_MUX_TARGETS_TO_ENABLE are mismatched: it causes the RISC-V Mux target to be disabled when either variable disables it, even when the other variable suggests that it should be enabled.

Description of change

Drop CA_RISCV_ENABLED and rely entirely on CA_MUX_TARGETS_TO_ENABLE instead.

For consistency, make the same change to CA_MUX_COMPILERS_TO_ENABLE.

For both CA_MUX_TARGETS_TO_ENABLE and CA_MUX_COMPILERS_TO_ENABLE, change the default to "host": we expect builds that rely on other targets or other compilers to already explicitly specify the desired target and compiler.

Anything else we should know?

If there's any other relevant information we should know that may help us in
understanding and verifying your patch, please include it here.

Checklist

  • Read and follow the project Code of Conduct.
  • Make sure the project builds successfully with your changes.
  • Run relevant testing locally to avoid regressions.
  • Run clang-format-19 on all modified code.

@hvdijk hvdijk requested a review from a team as a code owner February 18, 2025 16:18
@hvdijk hvdijk force-pushed the drop-riscv-enabled branch from 95812b7 to f04e99b Compare February 18, 2025 16:36
The CA_(target)_ENABLED options were provided because we simultaneously
wanted to enable all available Mux targets by default, and disable the
RISC-V Mux target by default. This is confusing when CA_RISCV_ENABLED and
CA_MUX_TARGETS_TO_ENABLE are mismatched: it causes the RISC-V Mux target
to be disabled when either variable disables it, even when the other
variable suggests that it should be enabled. Drop CA_(target)_ENABLED and
rely entirely on CA_MUX_TARGETS_TO_ENABLE instead.

For consistency, make the same change to CA_MUX_COMPILERS_TO_ENABLE.

For both CA_MUX_TARGETS_TO_ENABLE and CA_MUX_COMPILERS_TO_ENABLE, change
the default to "host", and update the documentation and continuous
integration to set them where we do not want host and were not already
setting them.
@hvdijk hvdijk force-pushed the drop-riscv-enabled branch from f04e99b to c2f792a Compare February 18, 2025 17:33
@@ -125,7 +125,6 @@ Currently recommended build options include:
.. code-block:: console

$ cmake -GNinja \
-DCA_RISCV_ENABLED=ON \
-DCA_MUX_TARGETS_TO_ENABLE="riscv" \
Copy link
Collaborator

Choose a reason for hiding this comment

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

surely this is wrong now if we have to enable the compiler one?
I'm not totally convinced that we shouldn't pick up a default one if we have the mux one enabled, it feels quite a lot and I think it might confuse people.

ca_option(CA_EXTERNAL_MUX_TARGET_DIRS STRING
"Semi-colon separated list of external ComputeMux target source directories" "")
ca_option(CA_MUX_COMPILERS_TO_ENABLE STRING
"Semi-colon separated list of ComputeMux compilers to enable, empty enables all" "")
"Semi-colon separated list of ComputeMux compilers to enable, empty enables all" "host")
Copy link
Collaborator

Choose a reason for hiding this comment

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

could we perhaps make it so it stays "" by default, but this means match the mux targets enabled if they exist? That would be closer to what we had before.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also the description doesn't match the default here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The description says empty enables all, it doesn't say empty is the default, I think the description is right. But I like your idea of matching the Mux targets.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yes you are right about the default, sorry about that.

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

Successfully merging this pull request may close these issues.

2 participants