about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2020-10-01 02:13:34 +0200
committerGitHub <noreply@github.com>2020-10-01 02:13:34 +0200
commit37df40bd1c9374ca91112f2d1ea0e27127130c09 (patch)
treeb262ff0dcb381edea7a7ba38fdcc3746e7c65738 /src/tools
parent8ccc063fbc54e5fea3a4811310ff0bb0821d2992 (diff)
parent7420d7a98044ea1bf727ab369cbc77232dd99694 (diff)
Rollup merge of #77202 - ehuss:defer-apple-sdkroot, r=petrochenkov
Defer Apple SDKROOT detection to link time.

This defers the detection of the SDKROOT for Apple iOS/tvOS targets to link time, instead of when the `Target` is defined. This allows commands that don't need to link to work (like `rustdoc` or `rustc --print=target-list`). This also makes `--print=target-list` a bit faster.

This also removes the note in the platform support documentation about these targets being missing. When I wrote it, I misunderstood how the SDKROOT stuff worked.

Notes:
* This means that JSON spec targets can't explicitly override these flags. I think that is probably fine, as I believe the value is generally required, and can be set with the SDKROOT environment variable.
* This changes `x86_64-apple-tvos` to use `appletvsimulator`. I think the original code was wrong (it was using `iphonesimulator`). Also, `x86_64-apple-tvos` seems broken in general, and I cannot build it locally. The `data_layout` does not appear to be correct (it is a copy of the arm64 layout instead of the x86_64 layout). I have not tried building Apple's LLVM to see if that helps, but I suspect it is just wrong (I'm uncertain since I don't know how the tvOS simulator works with its bitcode-only requirements).
* I'm tempted to remove the use of `Result` for built-in target definitions, since I don't think they should be fallible. This was added in https://github.com/rust-lang/rust/pull/34980, but that only relates to JSON definitions. I think the built-in targets shouldn't fail. I can do this now, or not.

Fixes #36156
Fixes #76584
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/tier-check/src/main.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/tools/tier-check/src/main.rs b/src/tools/tier-check/src/main.rs
index b8d60a5e2fe..6a492bbff4d 100644
--- a/src/tools/tier-check/src/main.rs
+++ b/src/tools/tier-check/src/main.rs
@@ -25,8 +25,6 @@ fn main() {
     let doc_targets: HashSet<_> = doc_targets_md
         .lines()
         .filter(|line| line.starts_with('`') && line.contains('|'))
-        // These platforms only exist on macos.
-        .filter(|line| !line.contains("[^apple]") || cfg!(target_os = "macos"))
         .map(|line| line.split('`').skip(1).next().expect("expected target code span"))
         .collect();