-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support specifying explicit SDK version #28696
Support specifying explicit SDK version #28696
Conversation
EWS run on previous version of this PR (hash d98521d) |
Tools/Scripts/webkitdirs.pm
Outdated
@@ -917,6 +917,8 @@ sub availableXcodeSDKs | |||
|
|||
sub isValidXcodeSDKPlatformName($) { | |||
my $name = shift; | |||
# strip sdk version and variant qualifiers prior to validating platform |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment says what the code does, but not why. I do not immediately understand why - make
always works with the active Xcode anyway, so it seems like there would be no need to specify SDK version, as there's only one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aproskuryakov if you have multiple sdk versions installed you cannot currently use the sdk argument to specify which sdk to use, e.g. build-webkit --sdk macosx14.1
will fail because "macosx14.1" is not in the list of valid platforms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @aproskuryakov, I'm not entirely sure what you're trying to accomplish. Do you have a special Xcode configuration where you have multiple SDKs for the same platform, differing only in version?
Tools/Scripts/webkitdirs.pm
Outdated
@@ -917,6 +917,8 @@ sub availableXcodeSDKs | |||
|
|||
sub isValidXcodeSDKPlatformName($) { | |||
my $name = shift; | |||
# strip sdk version and variant qualifiers prior to validating platform | |||
$name =~ s/(\d+\.[\d\.]+)?(\.internal)?$//; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think stripping the version in the validation function makes sense, because then we'd have to make sure that the rest of webkitdirs
can handle when $xcodeSDKPlatformName contains a version number. What I would recommend instead is a modification to determineXcodeSDKPlatformName
:
if (checkForArgumentAndRemoveFromARGVGettingValue("--sdk", \$sdk)) {
$xcodeSDK = lc $sdk;
$xcodeSDKPlatformName ||= $sdk;
- $xcodeSDKPlatformName =~ s/\.internal$//;
+ $xcodeSDKPlatformName =~ s/(\d+\.[\d\.]+)?(\.internal)?$//;
die "Couldn't determine platform name from Xcode SDK" unless isValidXcodeSDKPlatformName($xcodeSDKPlatformName);
return;
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that seems more correct to me assuming that's what gets passed to the validation code, I will try to verify in a bit
d98521d
to
a2b2dad
Compare
Updated to the much more sensible suggestion of "just set the platform name correctly" approach, have verified correct behavior, but I'm wondering if this change should also include logic to verify the requested SDK actually exists, or if that should be a follow on change? |
a2b2dad
to
4814eae
Compare
EWS run on previous version of this PR (hash 4814eae)
|
Actually checking "does the requested sdk exist" is actually trivial so just including it |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r=me
Tools/Scripts/webkitdirs.pm
Outdated
`xcrun --sdk $xcodeSDK --show-sdk-path 2>&1`; | ||
die "Unable to find requested sdk '" . $xcodeSDK . "' requested" if exitStatus($?); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Talked privately but: I've tried to avoid making calls to xcrun
when executing XcodeOptions()
, since xcrun can be a little slow (~2 sec) when uncached. So, I'd suggest to not unconditionally run this, especially since most people pass an unversioned SDK name.
4814eae
to
6163619
Compare
EWS run on current version of this PR (hash 6163619)
|
https://bugs.webkit.org/show_bug.cgi?id=274298 Reviewed by Elliott Williams. Strip the version number from the specified SDK as well when setting the platform name * Tools/Scripts/webkitdirs.pm: (determineXcodeSDKPlatformName): Canonical link: https://commits.webkit.org/279009@main
6163619
to
9140fbd
Compare
Committed 279009@main (9140fbd): https://commits.webkit.org/279009@main Reviewed commits have been landed. Closing PR #28696 and removing active labels. |
9140fbd
6163619
π§ͺ wpe-wk2π§ͺ ios-wk2-wptπ§ͺ mac-AS-debug-wk2π§ͺ gtk-wk2π tv-simπ§ͺ api-gtkπ watch