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

unified implict feature for platform deduction #898

Merged
merged 1 commit into from
May 1, 2024

Conversation

grisumbras
Copy link
Member

This changes separate deduction of address-model and architecture with a single x-deduced-platform (the corresponding rule is platform. The purpose of this is to shorten the target path, while keeping it unique for different configurations.

The logic of the conditional rule is this:

  1. If there's already x-deduced-platform in the property set, then return that (this is needed for repeated evaluation of conditionals).
  2. If eihter address-model or architecture could not be deduced, return nothing.
  3. Get address-model and architecture properties from the property set, assign deduced values to any if it is empty.
  4. Construct the corresponding value of x-deduced-platform. If there's no corresponfing value (e.g. user requested an architecture we don't support for deduction), return nothing.
  5. Otherwise return the constructed value.

The feature x-deduced-platform is composite. Due to that it subsumes properties that constitute it. Meaning, <address-model>32 <x-deduced-platform>x86 corresponds to the path x86 and not x86/address-model-32. Which is pretty neat.

The x- in the name x-deduced-platform is so that it sorts last.

@grisumbras grisumbras force-pushed the refactor/platform-deduction branch from 9f89da0 to ebb268f Compare May 1, 2024 15:30
@grisumbras
Copy link
Member Author

Changed the feature to have values in the form X_32 and X_64. The change to underscore was because there's apparently special logic for hyphens in values of implicit features (presumably, for toolsets).

@grisumbras grisumbras force-pushed the refactor/platform-deduction branch from ebb268f to 441c7d2 Compare May 1, 2024 15:35
@pdimov pdimov merged commit 3cb4baf into boostorg:develop May 1, 2024
22 checks passed
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