Skip to content

Conversation

madsmtm
Copy link
Contributor

@madsmtm madsmtm commented Mar 25, 2025

Move various Apple version handling code in the compiler out rustc_codegen_ssa and into a place where it can be accessed by rustc_attr_parsing, which I found to be necessary when doing #136867. Thought I'd split it out to make it easier to land, and to make further changes like #131477 have fewer conflicts / PR dependencies.

There should be no functional changes in this PR.

@rustbot label O-apple
r? rust-lang/compiler

@rustbot
Copy link
Collaborator

rustbot commented Mar 25, 2025

Failed to set assignee to t-compiler: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

@rustbot rustbot added O-apple Operating system: Apple (macOS, iOS, tvOS, visionOS, watchOS) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 25, 2025
@rustbot
Copy link
Collaborator

rustbot commented Mar 25, 2025

These commits modify compiler targets.
(See the Target Tier Policy.)

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

@madsmtm madsmtm changed the title Refactor Apple versions Refactor Apple version handling in the compiler Mar 25, 2025
@BoxyUwU
Copy link
Member

BoxyUwU commented Mar 26, 2025

r? compiler

@rustbot rustbot assigned Noratrieb and unassigned BoxyUwU Mar 26, 2025
@madsmtm madsmtm force-pushed the refactor-apple-versions branch 2 times, most recently from 39b5847 to 72b5ef0 Compare March 28, 2025 10:39
@Noratrieb
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 2, 2025

📌 Commit 72b5ef0 has been approved by Noratrieb

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 2, 2025
Zalathar added a commit to Zalathar/rust that referenced this pull request Apr 4, 2025
…=Noratrieb

Refactor Apple version handling in the compiler

Move various Apple version handling code in the compiler out `rustc_codegen_ssa` and into a place where it can be accessed by `rustc_attr_parsing`, which I found to be necessary when doing rust-lang#136867. Thought I'd split it out to make it easier to land, and to make further changes like rust-lang#131477 have fewer conflicts / PR dependencies.

There should be no functional changes in this PR.

`@rustbot` label O-apple
r? rust-lang/compiler
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 4, 2025
Rollup of 14 pull requests

Successful merges:

 - rust-lang#137869 (Demote i686-pc-windows-gnu to Tier 2)
 - rust-lang#137880 (Autodiff batching)
 - rust-lang#138546 (Add integer to string formatting tests)
 - rust-lang#138947 (Refactor Apple version handling in the compiler)
 - rust-lang#138950 (replace extra_filename with strict version hash in metrics file names)
 - rust-lang#139213 (Run coretests and alloctests with cg_clif in CI)
 - rust-lang#139274 (Rustdoc: typecheck settings.js)
 - rust-lang#139295 (Remove creation of duplicate `AnonPipe`)
 - rust-lang#139298 (Allow for missing invisible close delim when reparsing an expression.)
 - rust-lang#139313 (Deduplicate some `rustc_middle` function bodies by calling the `rustc_type_ir` equivalent)
 - rust-lang#139317 (compiletest: Encapsulate all of the code that touches libtest)
 - rust-lang#139322 (Add helper function for checking LLD usage to `run-make-support`)
 - rust-lang#139335 (Pass correct param-env to `error_implies`)
 - rust-lang#139342 (Add a mailmap entry for myself)

Failed merges:

 - rust-lang#138949 (Rename `is_like_osx` to `is_like_darwin`)

r? `@ghost`
`@rustbot` modify labels: rollup
Zalathar added a commit to Zalathar/rust that referenced this pull request Apr 4, 2025
…=Noratrieb

Refactor Apple version handling in the compiler

Move various Apple version handling code in the compiler out `rustc_codegen_ssa` and into a place where it can be accessed by `rustc_attr_parsing`, which I found to be necessary when doing rust-lang#136867. Thought I'd split it out to make it easier to land, and to make further changes like rust-lang#131477 have fewer conflicts / PR dependencies.

There should be no functional changes in this PR.

``@rustbot`` label O-apple
r? rust-lang/compiler
@bors
Copy link
Collaborator

bors commented Apr 4, 2025

☔ The latest upstream changes (presumably #139354) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Apr 4, 2025
@madsmtm
Copy link
Contributor Author

madsmtm commented Apr 4, 2025

Rebased.

@rustbot ready

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 4, 2025
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 4, 2025
@madsmtm madsmtm force-pushed the refactor-apple-versions branch from 72b5ef0 to 7e4379c Compare April 4, 2025 13:03
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 4, 2025
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#138546 (Add integer to string formatting tests)
 - rust-lang#138950 (replace extra_filename with strict version hash in metrics file names)
 - rust-lang#139028 (Make target maintainers more easily pingable)
 - rust-lang#139274 (Rustdoc: typecheck settings.js)
 - rust-lang#139275 (Update the minimum external LLVM to 19)
 - rust-lang#139328 (Fix 2024 edition doctest panic output)

Failed merges:

 - rust-lang#138947 (Refactor Apple version handling in the compiler)

r? `@ghost`
`@rustbot` modify labels: rollup
@Noratrieb
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 6, 2025

📌 Commit 7e4379c has been approved by Noratrieb

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 6, 2025
@bors
Copy link
Collaborator

bors commented Apr 6, 2025

⌛ Testing commit 7e4379c with merge f5c5102...

@bors
Copy link
Collaborator

bors commented Apr 6, 2025

☀️ Test successful - checks-actions
Approved by: Noratrieb
Pushing f5c5102 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 6, 2025
@bors bors merged commit f5c5102 into rust-lang:master Apr 6, 2025
7 checks passed
@rustbot rustbot added this to the 1.88.0 milestone Apr 6, 2025
Copy link
Contributor

github-actions bot commented Apr 6, 2025

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing e7df5b0 (parent) -> f5c5102 (this PR)

Test differences

Show 242 test diffs

Stage 1

  • errors::verify_codegen_ssa_aix_strip_not_used_141: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_apple_deployment_target_too_low_77: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_atomic_compare_exchange_87: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_dlltool_fail_import_library_133: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_dlltool_fail_import_library_135: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_error_calling_dlltool_137: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_error_creating_remark_dir_138: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_error_writing_def_file_136: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_illegal_link_ordinal_format_129: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_illegal_link_ordinal_format_131: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_basic_integer_type_89: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_basic_integer_type_91: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_cannot_return_118: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_cast_wide_pointer_121: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_cast_wide_pointer_123: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_expected_return_type_114: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_expected_usize_125: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_float_to_int_unchecked_91: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_floating_point_vector_94: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_inserted_type_112: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_invalid_bitmask_101: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_mask_type_114: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_mask_type_116: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_return_element_110: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_return_integer_type_105: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_return_length_107: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_second_argument_length_105: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_argument_97: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_first_97: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_first_99: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_input_96: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_input_98: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_return_100: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_second_100: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_second_98: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_simd_shuffle_108: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_third_arg_element_type_120: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_unrecognized_intrinsic_96: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_unsupported_operation_125: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_unsupported_symbol_of_size_119: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_invalid_monomorphization_unsupported_symbol_of_size_121: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_invalid_windows_subsystem_83: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_metadata_object_file_write_82: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_missing_memory_ordering_85: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_mixed_export_name_and_no_mangle_140: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_target_feature_safe_trait_130: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_target_feature_safe_trait_132: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_unknown_archive_kind_79: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_unknown_archive_kind_81: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_unknown_atomic_operation_90: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_unsupported_link_self_contained_77: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_xcrun_failed_invoking_141: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_xcrun_sdk_path_warning_145: pass -> [missing] (J0)
  • errors::verify_codegen_ssa_xcrun_unsuccessful_142: [missing] -> pass (J0)
  • errors::verify_codegen_ssa_xcrun_unsuccessful_144: pass -> [missing] (J0)
  • errors::verify_session_apple_deployment_target_invalid_0: [missing] -> pass (J0)
  • errors::verify_session_binary_float_literal_not_supported_39: pass -> [missing] (J0)
  • errors::verify_session_cannot_mix_and_match_sanitizers_10: [missing] -> pass (J0)
  • errors::verify_session_crate_name_empty_28: pass -> [missing] (J0)
  • errors::verify_session_embed_source_insufficient_dwarf_version_22: [missing] -> pass (J0)
  • errors::verify_session_failed_to_create_profiler_47: pass -> [missing] (J0)
  • errors::verify_session_failed_to_create_profiler_49: [missing] -> pass (J0)
  • errors::verify_session_file_write_fail_27: pass -> [missing] (J0)
  • errors::verify_session_file_write_fail_29: [missing] -> pass (J0)
  • errors::verify_session_function_return_requires_x86_or_x86_64_44: [missing] -> pass (J0)
  • errors::verify_session_function_return_thunk_extern_requires_non_large_code_model_43: pass -> [missing] (J0)
  • errors::verify_session_hexadecimal_float_literal_not_supported_37: pass -> [missing] (J0)
  • errors::verify_session_incompatible_linker_flavor_41: pass -> [missing] (J0)
  • errors::verify_session_instrumentation_not_supported_7: [missing] -> pass (J0)
  • errors::verify_session_invalid_character_in_crate_name_29: pass -> [missing] (J0)
  • errors::verify_session_invalid_float_literal_width_36: [missing] -> pass (J0)
  • errors::verify_session_invalid_literal_suffix_30: pass -> [missing] (J0)
  • errors::verify_session_invalid_literal_suffix_32: [missing] -> pass (J0)
  • errors::verify_session_invalid_num_literal_base_prefix_34: [missing] -> pass (J0)
  • errors::verify_session_invalid_num_literal_suffix_33: pass -> [missing] (J0)
  • errors::verify_session_invalid_num_literal_suffix_35: [missing] -> pass (J0)
  • errors::verify_session_linker_plugin_lto_windows_not_supported_3: [missing] -> pass (J0)
  • errors::verify_session_not_circumvent_feature_2: [missing] -> pass (J0)
  • errors::verify_session_octal_float_literal_not_supported_38: pass -> [missing] (J0)
  • errors::verify_session_profile_sample_use_file_does_not_exist_5: [missing] -> pass (J0)
  • errors::verify_session_profile_use_file_does_not_exist_2: pass -> [missing] (J0)
  • errors::verify_session_sanitizer_cfi_canonical_jump_tables_requires_cfi_14: [missing] -> pass (J0)
  • errors::verify_session_sanitizer_cfi_generalize_pointers_requires_cfi_13: pass -> [missing] (J0)
  • errors::verify_session_sanitizer_cfi_normalize_integers_requires_cfi_14: pass -> [missing] (J0)
  • errors::verify_session_sanitizer_cfi_normalize_integers_requires_cfi_16: [missing] -> pass (J0)
  • errors::verify_session_sanitizer_cfi_requires_single_codegen_unit_11: pass -> [missing] (J0)
  • errors::verify_session_sanitizer_kcfi_arity_requires_kcfi_17: [missing] -> pass (J0)
  • errors::verify_session_sanitizers_not_supported_7: pass -> [missing] (J0)
  • errors::verify_session_soft_float_deprecated_49: pass -> [missing] (J0)
  • errors::verify_session_split_debuginfo_unstable_platform_27: [missing] -> pass (J0)
  • errors::verify_session_target_small_data_threshold_not_supported_23: pass -> [missing] (J0)
  • errors::verify_session_unsupported_crate_type_for_target_40: pass -> [missing] (J0)
  • errors::verify_session_unsupported_crate_type_for_target_42: [missing] -> pass (J0)
  • errors::verify_session_unsupported_dwarf_version_19: pass -> [missing] (J0)
  • errors::verify_session_unsupported_reg_struct_return_arch_46: pass -> [missing] (J0)
  • errors::verify_session_unsupported_reg_struct_return_arch_48: [missing] -> pass (J0)
  • errors::verify_session_unsupported_regparm_46: [missing] -> pass (J0)
  • errors::verify_session_unsupported_regparm_arch_45: pass -> [missing] (J0)
  • errors::verify_session_unsupported_regparm_arch_47: [missing] -> pass (J0)
  • spec::base::apple::tests::test_parse_version: [missing] -> pass (J0)

(and 142 additional test diffs)

Job group index

  • J0: aarch64-apple, aarch64-gnu, i686-gnu-2, i686-gnu-nopt-2, i686-msvc-2, x86_64-apple-1, x86_64-gnu, x86_64-gnu-llvm-19-3, x86_64-gnu-nopt, x86_64-gnu-stable, x86_64-mingw-2, x86_64-msvc-2

Job duration changes

  1. dist-apple-various: 6642.9s -> 7681.4s (15.6%)
  2. test-various: 4211.6s -> 4447.1s (5.6%)
  3. i686-msvc-2: 7029.4s -> 7228.6s (2.8%)
  4. dist-x86_64-netbsd: 4941.4s -> 5077.1s (2.7%)
  5. dist-armhf-linux: 5023.6s -> 5155.9s (2.6%)
  6. dist-x86_64-illumos: 5509.2s -> 5645.6s (2.5%)
  7. x86_64-gnu-distcheck: 4756.2s -> 4870.2s (2.4%)
  8. dist-i586-gnu-i586-i686-musl: 5125.9s -> 5233.3s (2.1%)
  9. dist-android: 2504.5s -> 2555.1s (2.0%)
  10. i686-gnu-1: 8371.8s -> 8528.4s (1.9%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@madsmtm madsmtm deleted the refactor-apple-versions branch April 6, 2025 13:25
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f5c5102): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results (secondary 4.3%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.3% [4.3%, 4.3%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

Results (secondary -0.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.0% [-0.0%, -0.0%] 2
All ❌✅ (primary) - - 0

Bootstrap: 776.061s -> 776.062s (0.00%)
Artifact size: 365.90 MiB -> 365.87 MiB (-0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. O-apple Operating system: Apple (macOS, iOS, tvOS, visionOS, watchOS) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants