-
Notifications
You must be signed in to change notification settings - Fork 15.3k
[clang][Driver][Darwin] Optionally use xcselect to find macOS SDK #119670
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
base: main
Are you sure you want to change the base?
Changes from all commits
9db768e
8b5afe0
27a5e19
7e9bbf7
dc195bd
8c0ea7f
c505838
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // UNSUPPORTED: xcselect | ||
| // CLANG_USE_XCSELECT will always have an SDK inferred. | ||
|
|
||
| // RUN: touch %t.o | ||
|
|
||
| // RUN: %clang -target x86_64-apple-macos10.13 -mlinker-version=520 \ | ||
| // RUN: -### %t.o 2>&1 \ | ||
| // RUN: | FileCheck --check-prefix=NOSDK %s | ||
| // RUN: %clang -target x86_64-apple-darwin17 -mlinker-version=520 \ | ||
| // RUN: -### %t.o 2>&1 \ | ||
| // RUN: | FileCheck --check-prefix=NOSDK %s | ||
| // NOSDK: "-platform_version" "macos" "10.13.0" "10.13.0" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,8 +43,8 @@ | |
|
|
||
| // RUN: %clang -target x86_64-apple-macos10.13 -mlinker-version=520 \ | ||
| // RUN: -### %t.o 2>&1 \ | ||
| // RUN: | FileCheck --check-prefix=NOSDK %s | ||
| // RUN: | FileCheck --check-prefix=INFERRED-SDK %s | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you want to delete those two. The test will fail if no CLANG_USE_XCSELECT is used.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think they'll pass since I've just relaxed the text to match against. But I'll double check locally for both enabling and disabling
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see. The value of the test is to check the behavior of matching the version when SDK is not provided. I don't think current test provide any value.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it does provide some value, particularly for builds with That is, we check that the first two arguments to That still seems valuable to me, even if it's not the same as the original test. However, if you're still not convinced, I can remove it. |
||
| // RUN: %clang -target x86_64-apple-darwin17 -mlinker-version=520 \ | ||
| // RUN: -### %t.o 2>&1 \ | ||
| // RUN: | FileCheck --check-prefix=NOSDK %s | ||
| // NOSDK: "-platform_version" "macos" "10.13.0" "10.13.0" | ||
| // RUN: | FileCheck --check-prefix=INFERRED-SDK %s | ||
| // INFERRED-SDK: "-platform_version" "macos" "10.13.0" "{{[0-9]+(\.[0-9]+)*}}" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| // REQUIRES: xcselect | ||
| // RUN: %clang -target arm64-apple-macosx -c -### %s 2> %t.log | ||
| // RUN: FileCheck %s <%t.log | ||
|
|
||
| // CHECK: "-isysroot" "{{.*}}/SDKs/MacOSX{{([0-9]+(\.[0-9]+)?)?}}.sdk" |
Uh oh!
There was an error while loading. Please reload this page.