diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-06-05 18:21:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-05 18:21:15 +0200 |
| commit | 1c17449ae39ee2d3ab5f7a056db4a23d7f0629b4 (patch) | |
| tree | 9e89d93f36d9bdcb8562ab35c81028990bd68dc3 /src/tools/compiletest | |
| parent | 33c02c37129777a985c8a712e59a29862a8f21c9 (diff) | |
| parent | 54b2e86db7f522294254ae5e4572feba28e0b929 (diff) | |
| download | rust-1c17449ae39ee2d3ab5f7a056db4a23d7f0629b4.tar.gz rust-1c17449ae39ee2d3ab5f7a056db4a23d7f0629b4.zip | |
Rollup merge of #126008 - Zalathar:fulldeps-19371, r=jieyouxu
Port `tests/run-make-fulldeps/issue-19371` to ui-fulldeps This test can run as an ordinary `tests/ui-fulldeps` test, with the help of some additional header variable substitutions to supply a sysroot and linker. --- Unlike #125973, this test appears to be testing something vaguely useful and breakable, which is why I didn't just delete it.
Diffstat (limited to 'src/tools/compiletest')
| -rw-r--r-- | src/tools/compiletest/src/header.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs index d10b9c7b626..91d11c1ae17 100644 --- a/src/tools/compiletest/src/header.rs +++ b/src/tools/compiletest/src/header.rs @@ -1268,6 +1268,8 @@ fn expand_variables(mut value: String, config: &Config) -> String { const CWD: &str = "{{cwd}}"; const SRC_BASE: &str = "{{src-base}}"; const BUILD_BASE: &str = "{{build-base}}"; + const SYSROOT_BASE: &str = "{{sysroot-base}}"; + const TARGET_LINKER: &str = "{{target-linker}}"; if value.contains(CWD) { let cwd = env::current_dir().unwrap(); @@ -1282,6 +1284,14 @@ fn expand_variables(mut value: String, config: &Config) -> String { value = value.replace(BUILD_BASE, &config.build_base.to_string_lossy()); } + if value.contains(SYSROOT_BASE) { + value = value.replace(SYSROOT_BASE, &config.sysroot_base.to_string_lossy()); + } + + if value.contains(TARGET_LINKER) { + value = value.replace(TARGET_LINKER, config.target_linker.as_deref().unwrap_or("")); + } + value } |
