-
Notifications
You must be signed in to change notification settings - Fork 10.5k
When running with the interpreter on Darwin, force the usage of the just built, stdlib when running the frontend. #37771
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
When running with the interpreter on Darwin, force the usage of the just built, stdlib when running the frontend. #37771
Conversation
@swift-ci smoke test |
@swift-ci test Apple Silicon |
5db9c9d
to
c88b6c8
Compare
Discovered an interpreter test that did not use target-jit-run (where the fix is). |
@swift-ci test |
@swift-ci test Apple Silicon |
0c982f2
to
d2491b5
Compare
@swift-ci test |
@swift-ci test apple silicon |
…ust built, stdlib when running the frontend. This is because we currently JIT in process resulting in weirdness around swift-frontend wanting to link against the host stdlib and the exec swift code wanting to link against the target stdlib. For now, we work around this by just saying in that case we will force swift-frontend to use the just built runtime so we are consistent. The only potential problem is that a bug in the just built runtime may now cause these tests to fail. But overall, that would suggest a problem we may want to catch in it of itself, so the work around I think makes sense until JITing is done in a separate process (which I think is the right fix). rdar://78768013
d2491b5
to
524c5e0
Compare
@swift-ci test apple silicon |
@swift-ci 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.
Two comments, but if the tests pass then feel free to merge as-is.
// RUN: %target-jit-run -interpret %s | %FileCheck %s -check-prefix=CHECK-NONE | ||
// RUN: %target-jit-run -interpret %s -Onone -g | %FileCheck %s -check-prefix=CHECK-NONE | ||
// RUN: %target-jit-run -interpret %s -Onone -g -- | %FileCheck %s -check-prefix=CHECK-NONE | ||
// RUN: %target-jit-run -interpret %s -Onone -g -- a b c | %FileCheck %s -check-prefix=CHECK-THREE |
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.
These can drop -interpret
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.
Touche.
@@ -1891,6 +1885,17 @@ if not kIsWindows: | |||
"SIMCTL_CHILD_DYLD_LIBRARY_PATH='{0}' " # Simulator option | |||
.format(all_stdlib_path, libdispatch_path)) + config.target_run | |||
|
|||
subst_target_jit_prefix = "" | |||
if platform.system() == 'Darwin' and config.target_run: |
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.
At one point you had a big comment about why this was needed; it would be nice to resurrect that.
I'll fix both of these once it lands. |
…bd410a6b620245 Fixes in response to feedback on #37771.
This is because we currently JIT in process resulting in weirdness around
swift-frontend wanting to link against the host stdlib and the exec swift code
wanting to link against the target stdlib. For now, we work around this by just
saying in that case we will force swift-frontend to use the just built runtime
so we are consistent. The only potential problem is that a bug in the just built
runtime may now cause these tests to fail. But overall, that would suggest a
problem we may want to catch in it of itself, so the work around I think makes
sense until JITing is done in a separate process (which I think is the right fix).
rdar://78768013