]> git.lizzy.rs Git - rust.git/commitdiff
Clarify dependency requirements in the face of cross-compilation
authorJosh Triplett <josh@joshtriplett.org>
Tue, 2 Nov 2021 12:38:51 +0000 (13:38 +0100)
committerJosh Triplett <josh@joshtriplett.org>
Tue, 2 Nov 2021 12:38:51 +0000 (13:38 +0100)
The requirement on dependencies was phrased in terms of "host tools",
but it was also intended to apply equally to targets that only support
cross-compilation. Only the exception (for libraries commonly needed for
binaries on the target) was intended to apply to host tools. Reword the
requirement to talk about the dependencies required for "compiling,
linking,and emitting functional binaries, libraries, or other code for
the target", rather than generically in terms of dependencies for
rustc/cargo.

This doesn't change the net effect of the requirements, since other
requirements already stated that the target can't make the Rust
toolchain depend on proprietary libraries. However, this should make the
requirements clearer.

src/doc/rustc/src/target-tier-policy.md

index 191021dea97fc83e4f85e94e62669b9fc29295bb..025f7e3984e257052dca63f8af0491acecb578b7 100644 (file)
@@ -141,17 +141,19 @@ approved by the appropriate team for that shared code before acceptance.
     or binary. In other words, the introduction of the target must not cause a
     user installing or running a version of Rust or the Rust tools to be
     subject to any new license requirements.
-  - If the target supports building host tools (such as `rustc` or `cargo`),
-    those host tools must not depend on proprietary (non-FOSS) libraries, other
-    than ordinary runtime libraries supplied by the platform and commonly used
-    by other binaries built for the target. For instance, `rustc` built for the
-    target may depend on a common proprietary C runtime library or console
-    output library, but must not depend on a proprietary code generation
-    library or code optimization library. Rust's license permits such
-    combinations, but the Rust project has no interest in maintaining such
-    combinations within the scope of Rust itself, even at tier 3.
-  - Targets should not require proprietary (non-FOSS) components to link a
-    functional binary or library.
+  - Compiling, linking, and emitting functional binaries, libraries, or other
+    code for the target (whether hosted on the target itself or cross-compiling
+    from another target) must not depend on proprietary (non-FOSS) libraries.
+    Host tools built for the target itself may depend on the ordinary runtime
+    libraries supplied by the platform and commonly used by other applications
+    built for the target, but those libraries must not be required for code
+    generation for the target; cross-compilation to the target must not require
+    such libraries at all. For instance, `rustc` built for the target may
+    depend on a common proprietary C runtime library or console output library,
+    but must not depend on a proprietary code generation library or code
+    optimization library. Rust's license permits such combinations, but the
+    Rust project has no interest in maintaining such combinations within the
+    scope of Rust itself, even at tier 3.
   - "onerous" here is an intentionally subjective term. At a minimum, "onerous"
     legal/licensing terms include but are *not* limited to: non-disclosure
     requirements, non-compete requirements, contributor license agreements