-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[COMPILETEST-UNTANGLE 4/N] Improve compiletest config documentation #143447
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
Conversation
@@ -51,6 +51,7 @@ pub(crate) fn configure_gdb(config: &Config) -> Option<Arc<Config>> { | |||
pub(crate) fn configure_lldb(config: &Config) -> Option<Arc<Config>> { | |||
config.lldb_python_dir.as_ref()?; | |||
|
|||
// FIXME: this is super old |
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.
Remark: intended to remove this warning in a follow-up.
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.
pub compile_lib_path: Utf8PathBuf, | ||
|
||
/// The library paths required for running compiled programs. | ||
/// Path to libraries needed to run the compiled executable for the **target** platform. This |
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.
If we actually run any binaries compiled by compiletest, they will need to run on the host, right? So these should be host runtime libraries (i.e. stdlib), or not?
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.
Good question, let me double-check.
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 believe this is actually accurate:
- The host == target case is trivial.
- When host != target, there are several ways for
compiletest
to actually run the target platform executable under the target platform environment:- The
remote-test-client
scheme (generally, and for run-make target executables): e.g. Reintroduce remote-test support in run-make tests #138652.rust/src/tools/compiletest/src/runtest.rs
Lines 1055 to 1070 in 733b47e
let proc_res = match &*self.config.target { // This is pretty similar to below, we're transforming: // // program arg1 arg2 // // into // // remote-test-client run program 2 support-lib.so support-lib2.so arg1 arg2 // // The test-client program will upload `program` to the emulator // along with all other support libraries listed (in this case // `support-lib.so` and `support-lib2.so`. It will then execute // the program on the emulator with the arguments specified // (in the environment we give the process) and then report back // the same result. _ if self.config.remote_test_client.is_some() => { - The
RUNNER
scheme (for run-make target executables): forward the bootstraprunner
torun-make
#141856
- The
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 is, these are in fact target runtime libraries (e.g. target std), and not host std or host runtime libraries.
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 pushed an update to include a FIXME to better document these schemes, as I had to figure that out from the implementation as well.
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.
Ah, ok, makes sense. Feel free to r=me then.
Including a bunch of FIXMEs.
e330c9c
to
7405e2a
Compare
@bors r=Kobzol rollup |
Rollup merge of #143447 - jieyouxu:compiletest-maintenance-4, r=Kobzol [COMPILETEST-UNTANGLE 4/N] Improve compiletest config documentation This is part of a patch series to untangle `compiletest` to hopefully nudge it towards being more maintainable. This PR should contain **no functional changes**. This is pulled out to its own PR to make follow-up changes easier to review. There are *intentionally* a *lot* of FIXME comments, intended to be gradually addressed in follow-ups. r? `@Kobzol`
This is part of a patch series to untangle
compiletest
to hopefully nudge it towards being more maintainable.This PR should contain no functional changes.
This is pulled out to its own PR to make follow-up changes easier to review.
There are intentionally a lot of FIXME comments, intended to be gradually addressed in follow-ups.
r? @Kobzol