diff options
| author | Raoul Strackx <raoul.strackx@fortanix.com> | 2020-03-31 11:28:01 +0200 |
|---|---|---|
| committer | Raoul Strackx <raoul.strackx@fortanix.com> | 2020-09-25 15:15:37 +0200 |
| commit | 159d11fb069fca88056bc1b8194d520489e3e921 (patch) | |
| tree | e44c87dbb316a10a8d6700a3bc43af2e00db6a28 /src/bootstrap | |
| parent | 7d3c3fdc1d57d555c726f1caa444e9dd5a02e142 (diff) | |
| download | rust-159d11fb069fca88056bc1b8194d520489e3e921.tar.gz rust-159d11fb069fca88056bc1b8194d520489e3e921.zip | |
Patch compilation test helpers for sgx platform
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/native.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs index 9e4d6d0023d..1e233cb3891 100644 --- a/src/bootstrap/native.rs +++ b/src/bootstrap/native.rs @@ -625,7 +625,14 @@ impl Step for TestHelpers { if builder.config.dry_run { return; } - let target = self.target; + // The x86_64-fortanix-unknown-sgx target doesn't have a working C + // toolchain. However, some x86_64 ELF objects can be linked + // without issues. Use this hack to compile the test helpers. + let target = if self.target == "x86_64-fortanix-unknown-sgx" { + TargetSelection::from_user("x86_64-unknown-linux-gnu") + } else { + self.target + }; let dst = builder.test_helpers_out(target); let src = builder.src.join("src/test/auxiliary/rust_test_helpers.c"); if up_to_date(&src, &dst.join("librust_test_helpers.a")) { @@ -649,7 +656,6 @@ impl Step for TestHelpers { } cfg.compiler(builder.cc(target)); } - cfg.cargo_metadata(false) .out_dir(&dst) .target(&target.triple) |
