Skip to content

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Jul 5, 2023

Resolves rdar://108288193

SDK-aligned `-clang-target` on Darwin platforms

Resolves rdar://108288193
@artemcm artemcm requested a review from xymus July 5, 2023 22:37
@artemcm
Copy link
Contributor Author

artemcm commented Jul 5, 2023

@swift-ci test

}
let plannedJobs = try driver.planBuild()
XCTAssertTrue(plannedJobs.contains { job in
job.commandLine.contains(subsequence: [.flag("-clang-target"), .flag("arm64-apple-macos10.15")])
Copy link
Contributor

Choose a reason for hiding this comment

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

Where does the macos10.15 come from here? Does it always pick the SDK version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it comes from the SDKSettings's:

"Version": "10.15",

let plannedJobs = try driver.planBuild()
XCTAssertTrue(plannedJobs.contains { job in
job.commandLine.contains(subsequence: [.flag("-clang-target"), .flag("arm64-apple-ios13.0")])
job.commandLine.contains(subsequence: [.flag("-clang-target"), .flag("arm64e-apple-ios13.3-macabi")])
Copy link
Contributor

Choose a reason for hiding this comment

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

Similarly here, are we remapping from the SDK version and not from the driver's -target flag?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For -clang-target, yes.
First added in #1274.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah interesting, thanks for the clarification!

@artemcm artemcm merged commit d45d46f into swiftlang:main Jul 6, 2023
@artemcm artemcm deleted the RobustExplicitModuleClangTargetRemap branch July 6, 2023 16:24
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