Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't include global asm in mir_keys, fix error body synthesis #137502

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Feb 23, 2025

r? oli-obk

Fixes #137470
Fixes #137471
Fixes #137472
Fixes #137473

try-job: aarch64-apple

@rustbot rustbot added 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 Feb 23, 2025
@rustbot
Copy link
Collaborator

rustbot commented Feb 23, 2025

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@@ -316,6 +316,9 @@ fn mir_keys(tcx: TyCtxt<'_>, (): ()) -> FxIndexSet<LocalDefId> {
// All body-owners have MIR associated with them.
let mut set: FxIndexSet<_> = tcx.hir_body_owners().collect();

// Remove the fake bodies for `global_asm!`, since they're useful to be emitted or encoded.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Remove the fake bodies for `global_asm!`, since they're useful to be emitted or encoded.
// Remove the fake bodies for `global_asm!`, since they're not useful to be emitted or encoded.

@compiler-errors compiler-errors force-pushed the global-asm-aint-mir-body branch from bc7b8f4 to f68ff69 Compare February 25, 2025 18:13
@compiler-errors
Copy link
Member Author

@bors r=oli-obk rollup

@bors
Copy link
Contributor

bors commented Feb 25, 2025

📌 Commit f68ff69 has been approved by oli-obk

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 Feb 25, 2025
fmease added a commit to fmease/rust that referenced this pull request Feb 26, 2025
…r-body, r=oli-obk

Don't include global asm in `mir_keys`, fix error body synthesis

r? oli-obk

Fixes rust-lang#137470
Fixes rust-lang#137471
Fixes rust-lang#137472
Fixes rust-lang#137473
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 26, 2025
Rollup of 13 pull requests

Successful merges:

 - rust-lang#136576 (pass optimization level to llvm-bitcode-linker)
 - rust-lang#137320 (fix(rustdoc): Fixed stability version in rustdoc)
 - rust-lang#137502 (Don't include global asm in `mir_keys`, fix error body synthesis)
 - rust-lang#137529 (remove few unused args)
 - rust-lang#137544 (tests: Add regression test for derive token invalidation (rust-lang#81099))
 - rust-lang#137559 (run some tests on emscripten again)
 - rust-lang#137601 (ssa/mono: deduplicate `type_has_metadata`)
 - rust-lang#137603 (codegen_llvm: avoid `Deref` impls w/ extern type)
 - rust-lang#137604 (trait_sel: resolve vars in host effects)
 - rust-lang#137609 (Complete the list of resources used in rustdoc output)
 - rust-lang#137613 (hir_analysis: skip self type of host effect preds in variances_of)
 - rust-lang#137614 (fix doc in library/core/src/pin.rs)
 - rust-lang#137622 (fix attribute-related ICE when parsing macro on the rhs of a name-value attribute)

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

fmease commented Feb 26, 2025

tests/ui/asm/global-asm-isnt-really-a-mir-body.rs#instrument failed on aarch64-apple in rollup #137649 with:

---- [ui] tests/ui/asm/global-asm-isnt-really-a-mir-body.rs#instrument stdout ----
error in revision `instrument`: test compilation failed although it shouldn't!
status: exit status: 1
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" "/Users/runner/work/rust/rust/tests/ui/asm/global-asm-isnt-really-a-mir-body.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/work/rust/rust/vendor" "--sysroot" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2" "--target=aarch64-apple-darwin" "--cfg" "instrument" "--check-cfg" "cfg(test,FALSE,emit_mir,instrument,cfi)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/asm/global-asm-isnt-really-a-mir-body.instrument" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "-Cinstrument-coverage" "-Zno-profiler-runtime"
--- stderr -------------------------------
error: linking with `cc` failed: exit status: 1
   |
   |
   = note:  "cc" "/var/folders/2s/h6hvv9ps03xgz_krkkstvq_r0000gn/T/rustchOsAJj/symbols.o" "<1 object files omitted>" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/libstd-d16fc3ab99251824.dylib" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/{libcompiler_builtins-*}.rlib" "-lSystem" "-lc" "-lm" "-arch" "arm64" "-mmacosx-version-min=11.0.0" "-L" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "-o" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/asm/global-asm-isnt-really-a-mir-body.instrument/global-asm-isnt-really-a-mir-body" "-Wl,-dead_strip" "-nodefaultlibs" "-Wl,-rpath,@loader_path/../../../../stage2/lib/rustlib/aarch64-apple-darwin/lib"
   = note: Undefined symbols for architecture arm64:
   = note: Undefined symbols for architecture arm64:
             "___llvm_profile_raw_version", referenced from:
           ld: symbol(s) not found for architecture arm64
           ld: symbol(s) not found for architecture arm64
           clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: aborting due to 1 previous error
------------------------------------------

#137649 (comment)

@bors r-

@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 Feb 26, 2025
@fmease
Copy link
Member

fmease commented Feb 26, 2025

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 26, 2025
…body, r=<try>

Don't include global asm in `mir_keys`, fix error body synthesis

r? oli-obk

Fixes rust-lang#137470
Fixes rust-lang#137471
Fixes rust-lang#137472
Fixes rust-lang#137473

try-job: aarch64-apple
@bors
Copy link
Contributor

bors commented Feb 26, 2025

⌛ Trying commit f68ff69 with merge e4f2b0d...

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-apple failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Updating files:  98% (51081/52123)
Updating files:  99% (51602/52123)
Updating files: 100% (52123/52123)
Updating files: 100% (52123/52123), done.
Switched to a new branch 'try'
branch 'try' set up to track 'origin/try'.
[command]/opt/homebrew/bin/git log -1 --format=%H
e4f2b0dd23f33adad7da3bd6bcefc4c54f68b63e
##[group]Run src/ci/scripts/setup-environment.sh
src/ci/scripts/setup-environment.sh
---
file:.git/config remote.origin.url=https://github.com/rust-lang-ci/rust
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config gc.auto=0
file:.git/config http.https://github.com/.extraheader=AUTHORIZATION: basic ***
file:.git/config branch.try.remote=origin
file:.git/config branch.try.merge=refs/heads/try
file:.git/config remote.upstream.fetch=+refs/heads/*:refs/remotes/upstream/*
file:.git/config submodule.library/backtrace.active=true
file:.git/config submodule.library/backtrace.url=https://github.com/rust-lang/backtrace-rs.git
file:.git/config submodule.library/stdarch.active=true
---
test [ui] tests/ui/asm/binary_asm_labels_allowed.rs ... ok
test [ui] tests/ui/asm/fail-const-eval-issue-121099.rs ... ok
test [ui] tests/ui/asm/generic_const_simd_vec_len.rs ... ignored, only executed when the architecture is x86_64
test [ui] tests/ui/asm/empty_global_asm.rs ... ok
test [ui] tests/ui/asm/global-asm-isnt-really-a-mir-body.rs#emit_mir ... ok
test [ui] tests/ui/asm/global-asm-with-error.rs ... ok
test [ui] tests/ui/asm/global-asm-with-lifetimes.rs ... ok
test [ui] tests/ui/asm/ice-bad-err-span-in-template-129503.rs ... ok
test [ui] tests/ui/asm/inline-asm-with-lifetimes.rs#bad ... ok
test [ui] tests/ui/asm/inline-asm-with-lifetimes.rs#bad ... ok
test [ui] tests/ui/asm/global-asm-isnt-really-a-mir-body.rs#instrument ... FAILED
test [ui] tests/ui/asm/inline-syntax.rs#arm_llvm_18 ... ignored, ignored when the LLVM version is between 19.0.0 and 99.0.0
test [ui] tests/ui/asm/inline-syntax.rs#x86_64 ... ok
test [ui] tests/ui/asm/inline-syntax.rs#arm ... ok
test [ui] tests/ui/asm/invalid-const-operand.rs ... ok
---
test [ui] tests/ui/zero-sized/zero-sized-tuple-struct.rs ... ok

failures:

---- [ui] tests/ui/asm/global-asm-isnt-really-a-mir-body.rs#instrument stdout ----
error in revision `instrument`: test compilation failed although it shouldn't!
status: exit status: 1
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2/bin/rustc" "/Users/runner/work/rust/rust/tests/ui/asm/global-asm-isnt-really-a-mir-body.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/.cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/Users/runner/work/rust/rust/vendor" "--sysroot" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/stage2" "--target=aarch64-apple-darwin" "--cfg" "instrument" "--check-cfg" "cfg(test,FALSE,emit_mir,instrument,cfi)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "-C" "prefer-dynamic" "--out-dir" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/asm/global-asm-isnt-really-a-mir-body.instrument" "-A" "unused" "-A" "internal_features" "-Crpath" "-Cdebuginfo=0" "-Lnative=/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "-Cinstrument-coverage" "-Zno-profiler-runtime"
--- stderr -------------------------------
error: linking with `cc` failed: exit status: 1
   |
   |
   = note:  "cc" "/var/folders/2s/h6hvv9ps03xgz_krkkstvq_r0000gn/T/rustc9QdKrC/symbols.o" "<1 object files omitted>" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/libstd-d16fc3ab99251824.dylib" "<sysroot>/lib/rustlib/aarch64-apple-darwin/lib/{libcompiler_builtins-*}.rlib" "-lSystem" "-lc" "-lm" "-arch" "arm64" "-mmacosx-version-min=11.0.0" "-L" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/native/rust-test-helpers" "-o" "/Users/runner/work/rust/rust/build/aarch64-apple-darwin/test/ui/asm/global-asm-isnt-really-a-mir-body.instrument/global-asm-isnt-really-a-mir-body" "-Wl,-dead_strip" "-nodefaultlibs" "-Wl,-rpath,@loader_path/../../../../stage2/lib/rustlib/aarch64-apple-darwin/lib"
   = note: Undefined symbols for architecture arm64:
   = note: Undefined symbols for architecture arm64:
             "___llvm_profile_raw_version", referenced from:
           ld: symbol(s) not found for architecture arm64
           ld: symbol(s) not found for architecture arm64
           clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: aborting due to 1 previous error
------------------------------------------




failures:
    [ui] tests/ui/asm/global-asm-isnt-really-a-mir-body.rs#instrument
test result: FAILED. 18304 passed; 1 failed; 312 ignored; 0 measured; 0 filtered out; finished in 470.89s

Some tests failed in compiletest suite=ui mode=ui host=aarch64-apple-darwin target=aarch64-apple-darwin
Build completed unsuccessfully in 0:35:37

@bors
Copy link
Contributor

bors commented Feb 26, 2025

💔 Test failed - checks-actions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
6 participants