rust/compiler
Jubilee 577f86dacd
Rollup merge of #117259 - dtolnay:macho, r=Nilstrieb
Declare rustc_target's dependency on object/macho

Without this, `cargo check` fails in crates that depend on rustc_target.

<details>
<summary>`cargo check` diagnostics</summary>

```console
    Checking rustc_target v0.0.0
error[E0433]: failed to resolve: could not find `macho` in `object`
   --> compiler/rustc_target/src/spec/apple_base.rs:176:17
    |
176 |         object::macho::PLATFORM_MACOS => Some((13, 1)),
    |                 ^^^^^ could not find `macho` in `object`

error[E0433]: failed to resolve: could not find `macho` in `object`
   --> compiler/rustc_target/src/spec/apple_base.rs:177:17
    |
177 |         object::macho::PLATFORM_IOS
    |                 ^^^^^ could not find `macho` in `object`

error[E0433]: failed to resolve: could not find `macho` in `object`
   --> compiler/rustc_target/src/spec/apple_base.rs:178:19
    |
178 |         | object::macho::PLATFORM_IOSSIMULATOR
    |                   ^^^^^ could not find `macho` in `object`

error[E0433]: failed to resolve: could not find `macho` in `object`
   --> compiler/rustc_target/src/spec/apple_base.rs:179:19
    |
179 |         | object::macho::PLATFORM_TVOS
    |                   ^^^^^ could not find `macho` in `object`

error[E0433]: failed to resolve: could not find `macho` in `object`
   --> compiler/rustc_target/src/spec/apple_base.rs:180:19
    |
180 |         | object::macho::PLATFORM_TVOSSIMULATOR
    |                   ^^^^^ could not find `macho` in `object`

error[E0433]: failed to resolve: could not find `macho` in `object`
   --> compiler/rustc_target/src/spec/apple_base.rs:181:19
    |
181 |         | object::macho::PLATFORM_MACCATALYST => Some((16, 2)),
    |                   ^^^^^ could not find `macho` in `object`

error[E0433]: failed to resolve: could not find `macho` in `object`
   --> compiler/rustc_target/src/spec/apple_base.rs:182:17
    |
182 |         object::macho::PLATFORM_WATCHOS | object::macho::PLATFORM_WATCHOSSIMULATOR => Some((9, 1)),
    |                 ^^^^^ could not find `macho` in `object`

error[E0433]: failed to resolve: could not find `macho` in `object`
   --> compiler/rustc_target/src/spec/apple_base.rs:182:51
    |
182 |         object::macho::PLATFORM_WATCHOS | object::macho::PLATFORM_WATCHOSSIMULATOR => Some((9, 1)),
    |                                                   ^^^^^ could not find `macho` in `object`

error[E0433]: failed to resolve: could not find `macho` in `object`
   --> compiler/rustc_target/src/spec/apple_base.rs:189:33
    |
189 |         ("macos", _) => object::macho::PLATFORM_MACOS,
    |                                 ^^^^^ could not find `macho` in `object`

error[E0433]: failed to resolve: could not find `macho` in `object`
   --> compiler/rustc_target/src/spec/apple_base.rs:190:38
    |
190 |         ("ios", "macabi") => object::macho::PLATFORM_MACCATALYST,
    |                                      ^^^^^ could not find `macho` in `object`

error[E0433]: failed to resolve: could not find `macho` in `object`
   --> compiler/rustc_target/src/spec/apple_base.rs:191:35
    |
191 |         ("ios", "sim") => object::macho::PLATFORM_IOSSIMULATOR,
    |                                   ^^^^^ could not find `macho` in `object`

error[E0433]: failed to resolve: could not find `macho` in `object`
   --> compiler/rustc_target/src/spec/apple_base.rs:192:31
    |
192 |         ("ios", _) => object::macho::PLATFORM_IOS,
    |                               ^^^^^ could not find `macho` in `object`

error[E0433]: failed to resolve: could not find `macho` in `object`
   --> compiler/rustc_target/src/spec/apple_base.rs:193:39
    |
193 |         ("watchos", "sim") => object::macho::PLATFORM_WATCHOSSIMULATOR,
    |                                       ^^^^^ could not find `macho` in `object`

error[E0433]: failed to resolve: could not find `macho` in `object`
   --> compiler/rustc_target/src/spec/apple_base.rs:194:35
    |
194 |         ("watchos", _) => object::macho::PLATFORM_WATCHOS,
    |                                   ^^^^^ could not find `macho` in `object`

error[E0433]: failed to resolve: could not find `macho` in `object`
   --> compiler/rustc_target/src/spec/apple_base.rs:195:36
    |
195 |         ("tvos", "sim") => object::macho::PLATFORM_TVOSSIMULATOR,
    |                                    ^^^^^ could not find `macho` in `object`

error[E0433]: failed to resolve: could not find `macho` in `object`
   --> compiler/rustc_target/src/spec/apple_base.rs:196:32
    |
196 |         ("tvos", _) => object::macho::PLATFORM_TVOS,
    |                                ^^^^^ could not find `macho` in `object`
```
</details>

`rustc_target` unconditionally contains its `spec` module (i.e. there is no `#[cfg]` on the `mod spec;`). The `spec/mod.rs` also does not start with `#![cfg]`.

aa91057796/compiler/rustc_target/src/lib.rs (L37)

Similarly, the `spec` module unconditionally contains `apple_base`.

aa91057796/compiler/rustc_target/src/spec/mod.rs (L62)

And, `apple_base` unconditionally refers to `object::macho`.

aa91057796/compiler/rustc_target/src/spec/apple_base.rs (L176)

So I figure there is no way `object::macho` isn't needed by rustc.

`object::macho` only exists if the `object` crate's "macho" feature is enabled. https://github.com/gimli-rs/object/blob/0.32.0/src/lib.rs#L111-L112
2023-10-28 17:10:30 -07:00
..
rustc Split out the stable part of smir into its own crate to prevent accidental usage of forever unstable things 2023-09-25 14:38:27 +00:00
rustc_abi fix failure to detect a too-big-type after adding padding 2023-10-27 18:07:53 +02:00
rustc_arena Stabilize [const_]pointer_byte_offsets 2023-10-25 22:35:12 +00:00
rustc_ast Rollup merge of #117114 - nnethercote:improve-stringify-test, r=petrochenkov 2023-10-26 22:26:11 +02:00
rustc_ast_lowering Auto merge of #117171 - fee1-dead-contrib:deny-explicit-effect-params, r=oli-obk 2023-10-26 14:50:23 +00:00
rustc_ast_passes s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
rustc_ast_pretty Auto merge of #116822 - notriddle:notriddle/rust-logo, r=fmease 2023-10-17 04:41:20 +00:00
rustc_attr Parse rustc version at compile time 2023-10-26 18:55:05 -07:00
rustc_baked_icu_data docs: add Rust logo to more compiler crates 2023-10-16 15:38:08 -07:00
rustc_borrowck Quietly fail if an error has already occurred 2023-10-26 11:14:53 +00:00
rustc_builtin_macros Auto merge of #116236 - dtolnay:builtinmacrocomment, r=cjgillot 2023-10-25 06:57:37 +00:00
rustc_codegen_cranelift Auto merge of #81746 - bjorn3:cg_clif_rustup_component, r=Mark-Simulacrum 2023-10-28 15:16:27 +00:00
rustc_codegen_gcc Merge commit '09ce29d0591a21e1abae22eac4d41ffd32993af8' into subtree-update_cg_gcc_2023-10-25 2023-10-27 16:07:01 -04:00
rustc_codegen_llvm Auto merge of #117123 - Zalathar:bad-counter-ids, r=petrochenkov 2023-10-28 17:43:07 +00:00
rustc_codegen_ssa Auto merge of #116035 - lqd:mcp-510-target-specs, r=petrochenkov 2023-10-27 02:11:36 +00:00
rustc_const_eval Refactor away the need for some descr methods. 2023-10-25 16:40:32 +00:00
rustc_data_structures Auto merge of #116849 - oli-obk:error_shenanigans, r=cjgillot 2023-10-23 09:59:40 +00:00
rustc_driver docs: add Rust logo to more compiler crates 2023-10-16 15:38:08 -07:00
rustc_driver_impl Rollup merge of #117268 - nnethercote:rustc_interface, r=oli-obk 2023-10-28 01:07:38 -07:00
rustc_error_codes Replace all uses of generator in markdown documentation with coroutine 2023-10-20 21:14:02 +00:00
rustc_error_messages docs: add Rust logo to more compiler crates 2023-10-16 15:38:08 -07:00
rustc_errors Stash and cancel cycle errors for auto trait leakage in opaques 2023-10-26 17:58:02 +00:00
rustc_expand Auto merge of #116818 - Nilstrieb:stop-submitting-bug-reports, r=wesleywiser 2023-10-26 02:08:07 +00:00
rustc_feature Rollup merge of #116943 - heiher:target-features, r=wesleywiser 2023-10-24 19:29:55 +02:00
rustc_fluent_macro Use v0.0.0 in compiler crates 2023-10-18 21:55:15 +00:00
rustc_fs_util
rustc_graphviz rustdoc: remove rust logo from non-Rust crates 2023-10-08 20:17:53 -07:00
rustc_hir Auto merge of #117171 - fee1-dead-contrib:deny-explicit-effect-params, r=oli-obk 2023-10-26 14:50:23 +00:00
rustc_hir_analysis Auto merge of #117171 - fee1-dead-contrib:deny-explicit-effect-params, r=oli-obk 2023-10-26 14:50:23 +00:00
rustc_hir_pretty Fiddle with State functions. 2023-10-11 10:46:55 +11:00
rustc_hir_typeck Rollup merge of #116968 - eopb:116967, r=petrochenkov 2023-10-26 22:26:10 +02:00
rustc_incremental Reduce some function exposure. 2023-10-26 09:04:26 +11:00
rustc_index Preserve DebugInfo in DeadStoreElimination. 2023-10-06 15:46:11 +00:00
rustc_infer Account for type param from other item in note_and_explain 2023-10-27 16:24:01 +00:00
rustc_interface Rollup merge of #117268 - nnethercote:rustc_interface, r=oli-obk 2023-10-28 01:07:38 -07:00
rustc_lexer Use v0.0.0 in compiler crates 2023-10-18 21:55:15 +00:00
rustc_lint Make ty::print::Printer take &mut self instead of self 2023-10-21 11:33:05 +02:00
rustc_lint_defs Auto merge of #116734 - Nadrieril:lint-per-column, r=cjgillot 2023-10-21 11:04:19 +00:00
rustc_llvm For i586/NetBSD: fix another formatting insistence. 2023-10-27 09:37:25 +00:00
rustc_log use env variable to control thread ids in rustc_log 2023-10-10 09:39:47 +08:00
rustc_macros Rollup merge of #117256 - dtolnay:currentversion, r=compiler-errors 2023-10-28 01:07:38 -07:00
rustc_metadata s/generator/coroutine/ 2023-10-20 21:14:01 +00:00
rustc_middle Rollup merge of #117256 - dtolnay:currentversion, r=compiler-errors 2023-10-28 01:07:38 -07:00
rustc_mir_build Auto merge of #103208 - cjgillot:match-fake-read, r=oli-obk,RalfJung 2023-10-27 18:51:43 +00:00
rustc_mir_dataflow Auto merge of #116300 - cjgillot:split-move, r=petrochenkov 2023-10-24 00:25:32 +00:00
rustc_mir_transform Auto merge of #117166 - oli-obk:mir_const_qualif_perf, r=petrochenkov 2023-10-27 16:06:02 +00:00
rustc_monomorphize coverage: Change query codegened_and_inlined_items to a plain function 2023-10-21 12:20:05 +11:00
rustc_parse Rollup merge of #117212 - clubby789:fix-ternary-recover, r=compiler-errors 2023-10-27 19:46:07 +02:00
rustc_parse_format rustdoc: remove rust logo from non-Rust crates 2023-10-08 20:17:53 -07:00
rustc_passes Rollup merge of #116868 - estebank:suggestion, r=petrochenkov 2023-10-27 11:48:05 +02:00
rustc_plugin_impl rustdoc: remove rust logo from non-Rust crates 2023-10-08 20:17:53 -07:00
rustc_privacy Merge associated types with the other alias types 2023-10-23 10:10:22 +00:00
rustc_query_impl Rollup merge of #116534 - cjgillot:no-dep-tasks, r=davidtwco 2023-10-28 01:07:35 -07:00
rustc_query_system Rollup merge of #116534 - cjgillot:no-dep-tasks, r=davidtwco 2023-10-28 01:07:35 -07:00
rustc_resolve Auto merge of #116858 - estebank:issue-22488, r=petrochenkov 2023-10-27 12:16:01 +00:00
rustc_serialize rustdoc: remove rust logo from non-Rust crates 2023-10-08 20:17:53 -07:00
rustc_session Rollup merge of #117268 - nnethercote:rustc_interface, r=oli-obk 2023-10-28 01:07:38 -07:00
rustc_smir Rollup merge of #117262 - celinval:issue-38-norm, r=oli-obk 2023-10-27 11:48:07 +02:00
rustc_span Pre-intern a symbol for env!("CFG_RELEASE") 2023-10-26 02:02:22 -07:00
rustc_symbol_mangling Rollup merge of #116834 - nnethercote:rustc_symbol_mangling, r=davidtwco 2023-10-27 19:46:06 +02:00
rustc_target Rollup merge of #117259 - dtolnay:macho, r=Nilstrieb 2023-10-28 17:10:30 -07:00
rustc_trait_selection Rollup merge of #116945 - estebank:sealed-trait-impls, r=petrochenkov 2023-10-28 01:07:37 -07:00
rustc_traits Detect cycle errors hidden by opaques during monomorphization 2023-09-13 17:35:44 +00:00
rustc_transmute Use v0.0.0 in compiler crates 2023-10-18 21:55:15 +00:00
rustc_ty_utils fix failure to detect a too-big-type after adding padding 2023-10-27 18:07:53 +02:00
rustc_type_ir Replace type flag HAS_TY_GENERATOR with HAS_TY_COROUTINE 2023-10-26 15:18:50 +02:00
stable_mir Rollup merge of #117262 - celinval:issue-38-norm, r=oli-obk 2023-10-27 11:48:07 +02:00