-
Notifications
You must be signed in to change notification settings - Fork 199
[embedded] A number of changes to support embedded Swift. #1455
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
[embedded] A number of changes to support embedded Swift. #1455
Conversation
@swift-ci please smoke test |
try commandLine.appendLast(.disableAutolinkingRuntimeCompatibility, from: &parsedOptions) | ||
try commandLine.appendLast(.runtimeCompatibilityVersion, from: &parsedOptions) | ||
try commandLine.appendLast(.disableAutolinkingRuntimeCompatibilityDynamicReplacements, from: &parsedOptions) | ||
try commandLine.appendLast(.disableAutolinkingRuntimeCompatibilityConcurrency, from: &parsedOptions) |
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.
Maybe we should drop this change as we probably still want to let users configure these options manually.
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.
CC @kubamracek
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.
All we need is to make sure these flags don't passed by default.
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.
Sort of feel like we should pass -runtime-compatibility-version none
by default. But this seems to work 🤷
let diags = DiagnosticsEngine() | ||
var driver = try Driver(args: ["swiftc", "-target", "arm64-apple-macosx10.13", "test.swift", "-enable-experimental-feature", "Embedded", "-parse-as-library", "-o", "a.out", "-module-name", "main"], diagnosticsEngine: diags) | ||
_ = try driver.planBuild() | ||
XCTAssertTrue(diags.diagnostics.first!.message.text == "Whole module optimization (wmo) must be enabled with embedded Swift.") |
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.
Could this assert against the actual variable instead of hardcoded text? That way tests won't break if diagnostic text needs to change.
XCTAssertTrue(diags.diagnostics.first!.message.text == "Whole module optimization (wmo) must be enabled with embedded Swift.") | |
XCTAssertTrue(diags.diagnostics.first!.message.text == error_need_wmo_embedded.message.text) |
@swift-ci please test |
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.
thanks!
@MaxDesiatov I can't follow you test suggestion (even though I think it's better) because of access levels:
Seems strings are how other diags are tested. |
@swift-ci please test |
@zoecarver Import that module with diagnostics as |
Aha! Thank you, Max! |
@swift-ci please test |
@swift-ci test windows |
No description provided.