Skip to content

[clang][Darwin] Simplify deployment version assignment in the Driver (#142013) #10802

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

Open
wants to merge 1 commit into
base: swift/release/6.2
Choose a base branch
from

Conversation

cyndyishida
Copy link

To be able to handle all of the ways the platform & deployment version can be represented in command line flags, the Darwin toolchain holds a type DarwinPlatform to help represent them. This patch simplifies the logic by:

  • reducing the amount of work done between string & version tuples conversions
  • renaming variables to reduce confusion about what target triple information is being manipulated.
  • allowing implicit transformation of macOS10.16 -> 11, there are other places in the compiler where this happens, and it was a bit confusing that the driver didn't do that for the cc1 call.

This is not a major refactor, but more simple & common tweaks across the file, in hopes to make it more readable.

(cherry picked from commit 752adc3)

…lvm#142013)

To be able to handle all of the ways the platform & deployment version
can be represented in command line flags, the Darwin toolchain holds a
type `DarwinPlatform` to help represent them. This patch simplifies the
logic by:
* reducing the amount of work done between string & version tuples
conversions
* renaming variables to reduce confusion about what target triple
information is being manipulated.
* allowing implicit transformation of macOS10.16 -> 11, there are other
places in the compiler where this happens, and it was a bit confusing
that the driver didn't do that for the cc1 call.

This is not a major refactor, but more simple & common tweaks across the
file, in hopes to make it more readable.

(cherry picked from commit 752adc3)
@cyndyishida cyndyishida requested a review from a team as a code owner June 6, 2025 23:06
@cyndyishida
Copy link
Author

@swfit-ci please test

@cyndyishida
Copy link
Author

@swift-ci please test

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.

1 participant