-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Driver: loosen restrictions for -force-autolink-symbol
#26614
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
Changes from all commits
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,11 @@ | ||
| // RUN: %swiftc_driver -incremental -autolink-force-load %s 2>&1 | %FileCheck -check-prefix=AUTOLINK_FORCE_LOAD %s | ||
| // RUN: %swiftc_driver -autolink-force-load -incremental %s 2>&1 | %FileCheck -check-prefix=AUTOLINK_FORCE_LOAD %s | ||
|
|
||
| // MACHO targets do not support COMDAT | ||
| // UNSUPPORTED: OS=macosx | ||
| // UNSUPPORTED: OS=tvos | ||
| // UNSUPPORTED: OS=watchos | ||
| // UNSUPPORTED: OS=ios | ||
|
|
||
| // AUTOLINK_FORCE_LOAD-NOT: error: '-autolink-force-load' is not supported with '-incremental' | ||
|
Contributor
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. For negative checks, it's best not to include the exact text of a diagnostic, because we tweak that sometimes. |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| // RUN: not %swiftc_driver -incremental -autolink-force-load %s 2>&1 | %FileCheck -check-prefix=AUTOLINK_FORCE_LOAD %s | ||
| // RUN: not %swiftc_driver -autolink-force-load -incremental %s 2>&1 | %FileCheck -check-prefix=AUTOLINK_FORCE_LOAD %s | ||
|
Contributor
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. There's no real reason to put this in a separate test file; since you're just testing the driver behavior, you can use
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. Hmm, yes, this is driver, not IRGen. My mistake. Either way, #26635 will remove the file. |
||
|
|
||
| // MACHO targets do not support COMDAT | ||
| // REQUIRES-ANY: OS=macosx, OS=tvos, OS=watchos, OS=ios | ||
|
|
||
| // AUTOLINK_FORCE_LOAD: error: '-autolink-force-load' is not supported with '-incremental' | ||
|
|
||
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.
Didn't we add this whole thing in the first place because we were using a COMMON global variable on Mach-O and that didn't work on Windows? Can't we go back to that on non-COMDAT platforms? (See #15647.)
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.
Yes, that is exactly what I did in #26635 (thanks to @rjmccall kicking my memory back into place!)