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

Refactorings to get rid of rustc_codegen_utils #69965

Merged
merged 1 commit into from
Mar 21, 2020

Conversation

mark-i-m
Copy link
Member

@mark-i-m mark-i-m commented Mar 12, 2020

r? @eddyb

cc #45276

After this, the only modules left in rustc_codegen_utils are

  • link: a bunch of linking-related functions (many dealing with file names). These are mostly consumed by save analysis, rustc_driver, rustc_interface, and of course codegen. I assume they live here because we don't want a dependency of save analysis on codegen... Perhaps they can be moved to librustc?
  • symbol_names and symbol_names_test: honestly it seems odd that symbol_names_test is not a submodule of symbol_names. It seems like these could honestly live in their own crate or move to librustc. Already name mangling is exported as the symbol_name query. (move it to its own crate)

I don't mind doing either of the above as part of this PR or a followup if you want.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 12, 2020
Copy link
Contributor

@Centril Centril left a comment

Choose a reason for hiding this comment

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

Since we're refactoring, I thought I'd take the opportunity to improve some pre-existing issues...

src/librustc_codegen_ssa/base.rs Outdated Show resolved Hide resolved
src/librustc_codegen_ssa/base.rs Outdated Show resolved Hide resolved
src/librustc_codegen_ssa/base.rs Outdated Show resolved Hide resolved
src/librustc_codegen_ssa/base.rs Outdated Show resolved Hide resolved
src/librustc_codegen_ssa/base.rs Outdated Show resolved Hide resolved
src/librustc_codegen_ssa/base.rs Outdated Show resolved Hide resolved
@mark-i-m mark-i-m force-pushed the codegen-utils branch 2 times, most recently from ea020a3 to 97c8364 Compare March 13, 2020 00:54
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-03-13T04:37:43.7945752Z ========================== Starting Command Output ===========================
2020-03-13T04:37:43.7948728Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/96d275d6-a7fb-4823-ba8b-d9b708f52267.sh
2020-03-13T04:37:43.7949666Z 
2020-03-13T04:37:43.7955777Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-13T04:37:43.7981391Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69965/merge to s
2020-03-13T04:37:43.7988314Z Task         : Get sources
2020-03-13T04:37:43.7988657Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-13T04:37:43.7988997Z Version      : 1.0.0
2020-03-13T04:37:43.7989253Z Author       : Microsoft
---
2020-03-13T04:37:44.7800405Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-13T04:37:44.7809470Z ##[command]git config gc.auto 0
2020-03-13T04:37:44.7817244Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-13T04:37:44.7824076Z ##[command]git config --get-all http.proxy
2020-03-13T04:37:44.7835006Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/69965/merge:refs/remotes/pull/69965/merge
---
2020-03-13T05:39:51.4334726Z .................................................................................................... 1700/9766
2020-03-13T05:39:55.5015613Z .................................................................................................... 1800/9766
2020-03-13T05:40:07.2162274Z ................................................................i................................... 1900/9766
2020-03-13T05:40:14.2631541Z .................................................................................................... 2000/9766
2020-03-13T05:40:29.3061540Z ......................................................iiiii......................................... 2100/9766
2020-03-13T05:40:39.6322024Z .................................................................................................... 2300/9766
2020-03-13T05:40:41.8801421Z .................................................................................................... 2400/9766
2020-03-13T05:40:45.0889769Z .................................................................................................... 2500/9766
2020-03-13T05:41:07.4718492Z .................................................................................................... 2600/9766
---
2020-03-13T05:43:51.8872957Z .........................i...............i.......................................................... 5000/9766
2020-03-13T05:44:01.6416604Z .................................................................................................... 5100/9766
2020-03-13T05:44:07.4328706Z ....................................................................i............................... 5200/9766
2020-03-13T05:44:13.7607784Z .................................................................................................... 5300/9766
2020-03-13T05:44:23.1299995Z .................................................ii.ii........i...i................................. 5400/9766
2020-03-13T05:44:31.3444812Z .................................................................................................... 5600/9766
2020-03-13T05:44:41.0525336Z .................................................................................................... 5700/9766
2020-03-13T05:44:47.4731309Z ........................................i........................................................... 5800/9766
2020-03-13T05:44:53.7026925Z .................................................................................................... 5900/9766
2020-03-13T05:44:53.7026925Z .................................................................................................... 5900/9766
2020-03-13T05:45:04.2951246Z .................................................................................................... 6000/9766
2020-03-13T05:45:13.1214833Z .................................ii...i..ii...........i............................................. 6100/9766
2020-03-13T05:45:30.6365018Z .................................................................................................... 6300/9766
2020-03-13T05:45:37.4796800Z .................................................................................................... 6400/9766
2020-03-13T05:45:37.4796800Z .................................................................................................... 6400/9766
2020-03-13T05:45:48.5253346Z ................................................................i..ii............................... 6500/9766
2020-03-13T05:46:18.0769440Z .................................................................................................... 6700/9766
2020-03-13T05:46:23.4674803Z ..............................................................i..................................... 6800/9766
2020-03-13T05:46:25.5514808Z .................................................................................................... 6900/9766
2020-03-13T05:46:27.6163875Z ................................................................................................i... 7000/9766
---
2020-03-13T05:48:08.2901323Z .................................................................................................... 7700/9766
2020-03-13T05:48:12.7968601Z .................................................................................................... 7800/9766
2020-03-13T05:48:18.8687434Z .................................................................................................... 7900/9766
2020-03-13T05:48:25.0819761Z ..............................................i..................................................... 8000/9766
2020-03-13T05:48:35.2923336Z ...............................................................................................iiiii 8100/9766
2020-03-13T05:48:41.2858207Z iiiii.i............................................................................................. 8200/9766
2020-03-13T05:48:55.8238096Z .................................................................................................... 8400/9766
2020-03-13T05:49:06.8870782Z .................................................................................................... 8500/9766
2020-03-13T05:49:18.9533034Z .................................................................................................... 8600/9766
2020-03-13T05:49:24.6679369Z .................................................................................................... 8700/9766
---
2020-03-13T05:51:45.6415070Z  finished in 7.600
2020-03-13T05:51:45.6415660Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-13T05:51:45.6415944Z 
2020-03-13T05:51:45.6416113Z running 179 tests
2020-03-13T05:51:48.4652260Z iiii......i...........ii..iiii....i....i...........i............i..i..................i....i........ 100/179
2020-03-13T05:51:50.8712995Z ....i.i.i...iii..iiiiiiiiiiiiiiii.......................iii............ii......
2020-03-13T05:51:50.8720792Z 
2020-03-13T05:51:50.8726748Z  finished in 5.517
2020-03-13T05:51:50.8906459Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-13T05:51:51.0589478Z 
---
2020-03-13T05:51:52.9864527Z  finished in 2.095
2020-03-13T05:51:53.0059714Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-13T05:51:53.1657156Z 
2020-03-13T05:51:53.1657978Z running 9 tests
2020-03-13T05:51:53.1659339Z iiiiiiiii
2020-03-13T05:51:53.1660900Z 
2020-03-13T05:51:53.1661210Z  finished in 0.159
2020-03-13T05:51:53.1849208Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-13T05:51:53.3861764Z 
---
2020-03-13T05:52:13.4741888Z  finished in 20.289
2020-03-13T05:52:13.4965413Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-13T05:52:13.7059934Z 
2020-03-13T05:52:13.7060492Z running 115 tests
2020-03-13T05:52:27.7131847Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii.........i.....i..i.......ii.i.ii.. 100/115
2020-03-13T05:52:29.4004056Z ...iiii.....ii.
2020-03-13T05:52:29.4005579Z 
2020-03-13T05:52:29.4005736Z  finished in 15.904
2020-03-13T05:52:29.4011973Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-13T05:52:29.4013219Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2020-03-13T06:06:00.7380474Z 
2020-03-13T06:06:00.7381849Z    Doc-tests core
2020-03-13T06:06:05.7043167Z 
2020-03-13T06:06:05.7044828Z running 2480 tests
2020-03-13T06:06:14.9020590Z ......iiiii......................................................................................... 100/2480
2020-03-13T06:06:24.0334214Z ....................................................................................ii.............. 200/2480
2020-03-13T06:06:44.7637834Z ...................i................................................................................ 400/2480
2020-03-13T06:06:44.7637834Z ...................i................................................................................ 400/2480
2020-03-13T06:06:54.5040208Z ........................................................................i..i..................iiii.. 500/2480
2020-03-13T06:07:10.9972177Z .................................................................................................... 700/2480
2020-03-13T06:07:19.4264957Z .................................................................................................... 800/2480
2020-03-13T06:07:27.8232240Z .................................................................................................... 900/2480
2020-03-13T06:07:36.4059508Z .................................................................................................... 1000/2480
---
2020-03-13T06:11:04.0093394Z .................................................thread '<unnamed>' panicked at 'explicit panic', src/libstd/io/stdio.rs:871:13
2020-03-13T06:11:04.0103577Z ... 300/760
2020-03-13T06:11:04.1182135Z .................................................................................................... 400/760
2020-03-13T06:11:06.1843949Z .................................................................................................... 500/760
2020-03-13T06:11:06.2250876Z .................thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:2741:22
2020-03-13T06:11:06.2270419Z ....thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: "SendError(..)"', src/libstd/sync/mpsc/mod.rs:2766:17
2020-03-13T06:11:06.2289336Z ....thread '.<unnamed>' panicked at '.called `Result::unwrap()` on an `Err` value: RecvError.', thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:2645:13
2020-03-13T06:11:06.2304647Z ......src/libstd/sync/mpsc/mod.rs:.2778:.21.
2020-03-13T06:11:06.4744037Z .................................thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:1997:22
2020-03-13T06:11:06.4772350Z ....thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:2034:21
2020-03-13T06:11:06.4817417Z .......thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: RecvError', src/libstd/sync/mpsc/mod.rs:1916:13
2020-03-13T06:11:06.4945819Z ................... 600/760
2020-03-13T06:11:08.5253219Z ...................thread '<unnamed>' panicked at 'explicit panic', src/libstd/sync/mutex.rs:633:13
2020-03-13T06:11:08.5254795Z .......thread '<unnamed>' panicked at 'test panic in inner thread to poison mutex', src/libstd/sync/mutex.rs:587:13
---
2020-03-13T06:11:17.5333313Z 
2020-03-13T06:11:17.5333663Z running 1010 tests
2020-03-13T06:11:35.9068568Z i................................................................................................... 100/1010
2020-03-13T06:11:46.3986599Z .................................................................................................... 200/1010
2020-03-13T06:11:53.8557812Z ..................iii......i......i...i......i...................................................... 300/1010
2020-03-13T06:11:59.1024968Z .................................................................................................... 400/1010
2020-03-13T06:12:06.1633557Z ............................................i..i......................................ii............ 500/1010
2020-03-13T06:12:19.0458562Z .................................................................................................... 700/1010
2020-03-13T06:12:19.0458562Z .................................................................................................... 700/1010
2020-03-13T06:12:26.0692241Z ....................................iiii............................................................ 800/1010
2020-03-13T06:12:40.4086446Z .................................................................................................... 900/1010
2020-03-13T06:12:47.3238355Z ..........................................................iiii...................................... 1000/1010
2020-03-13T06:12:47.7976542Z test result: ok. 990 passed; 0 failed; 20 ignored; 0 measured; 0 filtered out
2020-03-13T06:12:47.7976822Z 
2020-03-13T06:12:47.8078334Z  finished in 171.825
2020-03-13T06:12:47.8093012Z Testing term stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-03-13T06:31:52.6929402Z  finished in 43.350
2020-03-13T06:31:52.7187867Z Check compiletest suite=run-make-fulldeps mode=run-make (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-13T06:31:52.9332467Z 
2020-03-13T06:31:52.9332869Z running 210 tests
2020-03-13T06:32:27.1565511Z ......................i...ii.................................F.....................................i 100/210
2020-03-13T06:33:08.3962724Z ........................................iiiiii......i..............iii.............................. 200/210
2020-03-13T06:33:12.9783043Z failures:
2020-03-13T06:33:12.9790105Z 
2020-03-13T06:33:12.9792234Z ---- [run-make] run-make-fulldeps/hotplug_codegen_backend stdout ----
2020-03-13T06:33:12.9792505Z 
2020-03-13T06:33:12.9792505Z 
2020-03-13T06:33:12.9792682Z error: make failed
2020-03-13T06:33:12.9792905Z status: exit code: 2
2020-03-13T06:33:12.9793146Z command: "make"
2020-03-13T06:33:12.9793352Z stdout:
2020-03-13T06:33:12.9793816Z ------------------------------------------
2020-03-13T06:33:12.9794181Z /bin/echo || exit 0 # This test requires /bin/echo to exist
2020-03-13T06:33:12.9794413Z 
2020-03-13T06:33:12.9796906Z LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/hotplug_codegen_backend/hotplug_codegen_backend:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/hotplug_codegen_backend/hotplug_codegen_backend -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/hotplug_codegen_backend/hotplug_codegen_backend  the_backend.rs --crate-name the_backend --crate-type dylib \
2020-03-13T06:33:12.9799603Z  -o /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/hotplug_codegen_backend/hotplug_codegen_backend/the_backend.dylib
2020-03-13T06:33:12.9800549Z Makefile:4: recipe for target 'all' failed
2020-03-13T06:33:12.9801422Z ------------------------------------------
2020-03-13T06:33:12.9801665Z stderr:
2020-03-13T06:33:12.9802110Z ------------------------------------------
2020-03-13T06:33:12.9802497Z error[E0432]: unresolved import `rustc_codegen_utils::codegen_backend`
2020-03-13T06:33:12.9802497Z error[E0432]: unresolved import `rustc_codegen_utils::codegen_backend`
2020-03-13T06:33:12.9803038Z   --> the_backend.rs:23:26
2020-03-13T06:33:12.9803265Z    |
2020-03-13T06:33:12.9803555Z 23 | use rustc_codegen_utils::codegen_backend::CodegenBackend;
2020-03-13T06:33:12.9804041Z    |                          ^^^^^^^^^^^^^^^ could not find `codegen_backend` in `rustc_codegen_utils`
2020-03-13T06:33:12.9804374Z 
2020-03-13T06:33:12.9804798Z warning: ignoring --out-dir flag due to -o flag
2020-03-13T06:33:12.9805220Z error: aborting due to previous error
2020-03-13T06:33:12.9805437Z 
2020-03-13T06:33:12.9805928Z For more information about this error, try `rustc --explain E0432`.
2020-03-13T06:33:12.9805928Z For more information about this error, try `rustc --explain E0432`.
2020-03-13T06:33:12.9806246Z make: *** [all] Error 1
2020-03-13T06:33:12.9806828Z ------------------------------------------
2020-03-13T06:33:12.9807026Z 
2020-03-13T06:33:12.9807136Z 
2020-03-13T06:33:12.9807244Z 
2020-03-13T06:33:12.9807244Z 
2020-03-13T06:33:12.9807406Z failures:
2020-03-13T06:33:12.9807869Z     [run-make] run-make-fulldeps/hotplug_codegen_backend
2020-03-13T06:33:12.9808095Z 
2020-03-13T06:33:12.9808659Z test result: FAILED. 194 passed; 1 failed; 15 ignored; 0 measured; 0 filtered out
2020-03-13T06:33:12.9808982Z 
2020-03-13T06:33:12.9813171Z 
2020-03-13T06:33:12.9813375Z 
2020-03-13T06:33:12.9824699Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/run-make-fulldeps" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "run-make" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-7/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "7.0.0\n" "--system-llvm" "--cc" "cc" "--cxx" "c++" "--cflags" "-ffunction-sections -fdata-sections -fPIC -m64" "--llvm-components" "aarch64 aarch64asmparser aarch64asmprinter aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpuasmprinter amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armasmprinter armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrasmprinter avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitwriter bpf bpfasmparser bpfasmprinter bpfcodegen bpfdesc bpfdisassembler bpfinfo codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfomsf debuginfopdb demangle dlltooldriver engine executionengine fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader lanai lanaiasmparser lanaiasmprinter lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker lto mc mcdisassembler mcjit mcparser mips mipsasmparser mipsasmprinter mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmprinter msp430codegen msp430desc msp430info native nativecodegen nvptx nvptxasmprinter nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcjit passes perfjitevents powerpc powerpcasmparser powerpcasmprinter powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata runtimedyld scalaropts selectiondag sparc sparcasmparser sparcasmprinter sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzasmprinter systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target transformutils vectorize webassembly webassemblyasmparser webassemblyasmprinter webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86asmprinter x86codegen x86desc x86disassembler x86info x86utils xcore xcoreasmprinter xcorecodegen xcoredesc xcoredisassembler xcoreinfo" "--ar" "ar" "--llvm-bin-dir" "/usr/lib/llvm-7/bin" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-03-13T06:33:12.9832384Z 
2020-03-13T06:33:12.9832499Z 
2020-03-13T06:33:12.9832768Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-03-13T06:33:12.9833145Z Build completed unsuccessfully in 1:49:55
2020-03-13T06:33:12.9833145Z Build completed unsuccessfully in 1:49:55
2020-03-13T06:33:12.9833911Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-03-13T06:33:12.9834393Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-03-13T06:33:12.9884940Z == clock drift check ==
2020-03-13T06:33:12.9897443Z   local time: Fri Mar 13 06:33:12 UTC 2020
2020-03-13T06:33:13.2724725Z   network time: Fri, 13 Mar 2020 06:33:13 GMT
2020-03-13T06:33:13.2725217Z == end clock drift check ==
2020-03-13T06:33:15.3799965Z 
2020-03-13T06:33:15.3859795Z ##[error]Bash exited with code '1'.
2020-03-13T06:33:15.3908738Z ##[section]Finishing: Run build
2020-03-13T06:33:15.3974500Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69965/merge to s
2020-03-13T06:33:15.3980188Z Task         : Get sources
2020-03-13T06:33:15.3980563Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-13T06:33:15.3980889Z Version      : 1.0.0
2020-03-13T06:33:15.3981116Z Author       : Microsoft
2020-03-13T06:33:15.3981116Z Author       : Microsoft
2020-03-13T06:33:15.3981503Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-03-13T06:33:15.3981920Z ==============================================================================
2020-03-13T06:33:15.7636869Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-03-13T06:33:15.7681783Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69965/merge to s
2020-03-13T06:33:15.7775336Z Cleaning up task key
2020-03-13T06:33:15.7776615Z Start cleaning up orphan processes.
2020-03-13T06:33:15.7955844Z Terminate orphan process: pid (3783) (python)
2020-03-13T06:33:15.8605163Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@mark-i-m

This comment has been minimized.

@eddyb
Copy link
Member

eddyb commented Mar 13, 2020

symbol_names and symbol_names_test: honestly it seems odd that symbol_names_test is not a submodule of symbol_names. It seems like these could honestly live in their own crate or move to librustc. Already name mangling is exported as the symbol_name query.

rustc_symbol_mangling seems fine to me.

@mark-i-m
Copy link
Member Author

@eddyb I created the rustc_symbol_mangling crate. Now the only thing left is rustc_codegen_utils::link. The obvious things would be to move it to rustc_codegen_ssa, but that would introduce a dependency for rustc_save_analysis. What do you think?

@eddyb
Copy link
Member

eddyb commented Mar 14, 2020

I have no idea why rustc_save_analysis would want that.
Also, IMO we should actually move out some of rustc_codegen_ssa::back stuff into a crate that's specifically about binary artifacts and linking.

I may even have an issue laying around that mentions this, not sure.

@mark-i-m
Copy link
Member Author

@eddyb I think it mostly uses the filename stuff. I can try to split out such a crate in a followup (e.g. rustc_binaries).

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-03-13T23:57:49.3397178Z ========================== Starting Command Output ===========================
2020-03-13T23:57:49.3400076Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/3a937bc7-f248-435f-910c-3685f6ba543c.sh
2020-03-13T23:57:49.3400415Z 
2020-03-13T23:57:49.3403952Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-13T23:57:49.3424296Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69965/merge to s
2020-03-13T23:57:49.3427002Z Task         : Get sources
2020-03-13T23:57:49.3427254Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-13T23:57:49.3427515Z Version      : 1.0.0
2020-03-13T23:57:49.3427678Z Author       : Microsoft
---
2020-03-13T23:57:50.3428264Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-13T23:57:50.3434720Z ##[command]git config gc.auto 0
2020-03-13T23:57:50.3439225Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-13T23:57:50.3443453Z ##[command]git config --get-all http.proxy
2020-03-13T23:57:50.3450569Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/69965/merge:refs/remotes/pull/69965/merge
---
2020-03-14T00:50:21.5927064Z .................................................................................................... 1700/9771
2020-03-14T00:50:26.2490169Z .................................................................................................... 1800/9771
2020-03-14T00:50:37.9941281Z ...................................................................i................................ 1900/9771
2020-03-14T00:50:44.9354227Z .................................................................................................... 2000/9771
2020-03-14T00:51:00.0404786Z .........................................................iiiii...................................... 2100/9771
2020-03-14T00:51:10.6341125Z .................................................................................................... 2300/9771
2020-03-14T00:51:12.9031732Z .................................................................................................... 2400/9771
2020-03-14T00:51:16.0330947Z .................................................................................................... 2500/9771
2020-03-14T00:51:38.3799366Z .................................................................................................... 2600/9771
---
2020-03-14T00:54:19.0935864Z ............................i...............i....................................................... 5000/9771
2020-03-14T00:54:28.8283835Z .................................................................................................... 5100/9771
2020-03-14T00:54:34.9562852Z .......................................................................i............................ 5200/9771
2020-03-14T00:54:40.4608520Z .................................................................................................... 5300/9771
2020-03-14T00:54:49.7597434Z ....................................................ii.ii........i...i.............................. 5400/9771
2020-03-14T00:54:56.9415800Z .................................................................................................... 5600/9771
2020-03-14T00:55:05.4592092Z .................................................................................................... 5700/9771
2020-03-14T00:55:10.9854677Z ............................................i....................................................... 5800/9771
2020-03-14T00:55:16.6091960Z .................................................................................................... 5900/9771
2020-03-14T00:55:16.6091960Z .................................................................................................... 5900/9771
2020-03-14T00:55:25.6310526Z .................................................................................................... 6000/9771
2020-03-14T00:55:31.2789712Z ......................................ii...i..ii...........i........................................ 6100/9771
2020-03-14T00:55:49.6064044Z .................................................................................................... 6300/9771
2020-03-14T00:55:53.0788995Z .................................................................................................... 6400/9771
2020-03-14T00:55:53.0788995Z .................................................................................................... 6400/9771
2020-03-14T00:55:57.5215838Z .....................................................................i..ii.......................... 6500/9771
2020-03-14T00:56:17.3098227Z .................................................................................................... 6700/9771
2020-03-14T00:56:24.7794834Z ...................................................................i................................ 6800/9771
2020-03-14T00:56:26.5343626Z .................................................................................................... 6900/9771
2020-03-14T00:56:28.4253903Z .................................................................................................... 7000/9771
---
2020-03-14T00:57:59.8483542Z .................................................................................................... 7800/9771
2020-03-14T00:58:05.1887018Z .................................................................................................... 7900/9771
2020-03-14T00:58:10.3619801Z ...................................................i................................................ 8000/9771
2020-03-14T00:58:19.8256738Z .................................................................................................... 8100/9771
2020-03-14T00:58:24.7318660Z iiiiiiiiii.i........................................................................................ 8200/9771
2020-03-14T00:58:37.1802940Z .................................................................................................... 8400/9771
2020-03-14T00:58:46.6867390Z .................................................................................................... 8500/9771
2020-03-14T00:58:58.2865237Z .................................................................................................... 8600/9771
2020-03-14T00:59:03.6434337Z .................................................................................................... 8700/9771
---
2020-03-14T01:01:07.7983415Z  finished in 6.597
2020-03-14T01:01:07.8161695Z Check compiletest suite=codegen mode=codegen (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-14T01:01:07.9595670Z 
2020-03-14T01:01:07.9596252Z running 179 tests
2020-03-14T01:01:10.6125033Z iiii......i...........ii..iiii....i....i...........i............i..i..................i....i........ 100/179
2020-03-14T01:01:12.6881733Z ....i.i.i...iii..iiiiiiiiiiiiiiii.......................iii............ii......
2020-03-14T01:01:12.6884879Z 
2020-03-14T01:01:12.6890477Z  finished in 4.873
2020-03-14T01:01:12.7072768Z Check compiletest suite=codegen-units mode=codegen-units (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-14T01:01:12.8532817Z 
---
2020-03-14T01:01:14.5597278Z  finished in 1.852
2020-03-14T01:01:14.5778091Z Check compiletest suite=assembly mode=assembly (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-14T01:01:14.7208812Z 
2020-03-14T01:01:14.7209150Z running 9 tests
2020-03-14T01:01:14.7210241Z iiiiiiiii
2020-03-14T01:01:14.7211484Z 
2020-03-14T01:01:14.7213595Z  finished in 0.143
2020-03-14T01:01:14.7393327Z Check compiletest suite=incremental mode=incremental (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-14T01:01:14.8874985Z 
---
2020-03-14T01:01:32.8147429Z  finished in 18.075
2020-03-14T01:01:32.8339618Z Check compiletest suite=debuginfo mode=debuginfo (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-14T01:01:32.9871244Z 
2020-03-14T01:01:32.9872115Z running 115 tests
2020-03-14T01:01:45.2262505Z iiiii..i.....i..i...i..i.i.i..i..i..ii....i.i....ii..........iiii.........i.....i..i.......ii.i.ii.. 100/115
2020-03-14T01:01:46.6850209Z ...iiii.....ii.
2020-03-14T01:01:46.6851806Z 
2020-03-14T01:01:46.6857810Z  finished in 13.851
2020-03-14T01:01:46.6863701Z Uplifting stage1 rustc (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-14T01:01:46.6864437Z Copying stage2 rustc from stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu / x86_64-unknown-linux-gnu)
---
2020-03-14T01:13:37.2181508Z 
2020-03-14T01:13:37.2182700Z    Doc-tests core
2020-03-14T01:13:41.2685554Z 
2020-03-14T01:13:41.2686545Z running 2480 tests
2020-03-14T01:13:49.2539482Z ......iiiii......................................................................................... 100/2480
2020-03-14T01:13:57.3820565Z ....................................................................................ii.............. 200/2480
2020-03-14T01:14:15.5920979Z ...................i................................................................................ 400/2480
2020-03-14T01:14:15.5920979Z ...................i................................................................................ 400/2480
2020-03-14T01:14:23.9269649Z ........................................................................i..i..................iiii.. 500/2480
2020-03-14T01:14:38.4326861Z .................................................................................................... 700/2480
2020-03-14T01:14:46.0356894Z .................................................................................................... 800/2480
2020-03-14T01:14:53.4552037Z .................................................................................................... 900/2480
2020-03-14T01:15:00.8978815Z .................................................................................................... 1000/2480
---
2020-03-14T01:18:13.0754221Z 
2020-03-14T01:18:13.0754667Z running 1010 tests
2020-03-14T01:18:29.0399608Z i................................................................................................... 100/1010
2020-03-14T01:18:38.2698317Z .................................................................................................... 200/1010
2020-03-14T01:18:44.7471529Z ..................iii......i......i...i......i...................................................... 300/1010
2020-03-14T01:18:49.3698451Z .................................................................................................... 400/1010
2020-03-14T01:18:55.5790617Z ............................................i..i......................................ii............ 500/1010
2020-03-14T01:19:06.9505746Z .................................................................................................... 700/1010
2020-03-14T01:19:06.9505746Z .................................................................................................... 700/1010
2020-03-14T01:19:13.1419749Z ....................................iiii............................................................ 800/1010
2020-03-14T01:19:25.8642278Z .................................................................................................... 900/1010
2020-03-14T01:19:32.0286751Z ..........................................................iiii...................................... 1000/1010
2020-03-14T01:19:32.4244886Z test result: ok. 990 passed; 0 failed; 20 ignored; 0 measured; 0 filtered out
2020-03-14T01:19:32.4245186Z 
2020-03-14T01:19:32.4334466Z  finished in 150.466
2020-03-14T01:19:32.4348291Z Testing term stage1 (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
---
2020-03-14T01:36:22.9693067Z  finished in 41.138
2020-03-14T01:36:23.9136972Z Check compiletest suite=run-make-fulldeps mode=run-make (x86_64-unknown-linux-gnu -> x86_64-unknown-linux-gnu)
2020-03-14T01:36:23.9174674Z 
2020-03-14T01:36:23.9174989Z running 210 tests
2020-03-14T01:36:55.1590042Z ......................i...ii.................................F.....................................i 100/210
2020-03-14T01:37:35.7269874Z ........................................iiiiii......i..............iii.............................. 200/210
2020-03-14T01:37:40.8851439Z failures:
2020-03-14T01:37:40.8861328Z 
2020-03-14T01:37:40.8862305Z ---- [run-make] run-make-fulldeps/hotplug_codegen_backend stdout ----
2020-03-14T01:37:40.8862536Z 
2020-03-14T01:37:40.8862536Z 
2020-03-14T01:37:40.8862718Z error: make failed
2020-03-14T01:37:40.8862922Z status: exit code: 2
2020-03-14T01:37:40.8863117Z command: "make"
2020-03-14T01:37:40.8863281Z stdout:
2020-03-14T01:37:40.8863713Z ------------------------------------------
2020-03-14T01:37:40.8864014Z /bin/echo || exit 0 # This test requires /bin/echo to exist
2020-03-14T01:37:40.8864245Z 
2020-03-14T01:37:40.8866478Z LD_LIBRARY_PATH="/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/hotplug_codegen_backend/hotplug_codegen_backend:/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-bootstrap-tools/x86_64-unknown-linux-gnu/release/deps:/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/lib" '/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc' --out-dir /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/hotplug_codegen_backend/hotplug_codegen_backend -L /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/hotplug_codegen_backend/hotplug_codegen_backend  the_backend.rs --crate-name the_backend --crate-type dylib \
2020-03-14T01:37:40.8868425Z  -o /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps/hotplug_codegen_backend/hotplug_codegen_backend/the_backend.dylib
2020-03-14T01:37:40.8869056Z Makefile:4: recipe for target 'all' failed
2020-03-14T01:37:40.8869632Z ------------------------------------------
2020-03-14T01:37:40.8869842Z stderr:
2020-03-14T01:37:40.8870217Z ------------------------------------------
2020-03-14T01:37:40.8870595Z error[E0433]: failed to resolve: could not find `symbol_names` in `rustc_codegen_utils`
2020-03-14T01:37:40.8870595Z error[E0433]: failed to resolve: could not find `symbol_names` in `rustc_codegen_utils`
2020-03-14T01:37:40.8871100Z   --> the_backend.rs:51:30
2020-03-14T01:37:40.8871288Z    |
2020-03-14T01:37:40.8871560Z 51 |         rustc_codegen_utils::symbol_names::provide(providers);
2020-03-14T01:37:40.8872018Z    |                              ^^^^^^^^^^^^ could not find `symbol_names` in `rustc_codegen_utils`
2020-03-14T01:37:40.8872295Z 
2020-03-14T01:37:40.8872688Z warning: ignoring --out-dir flag due to -o flag
2020-03-14T01:37:40.8873084Z error: aborting due to previous error
2020-03-14T01:37:40.8873250Z 
2020-03-14T01:37:40.8873707Z For more information about this error, try `rustc --explain E0433`.
2020-03-14T01:37:40.8873707Z For more information about this error, try `rustc --explain E0433`.
2020-03-14T01:37:40.8874014Z make: *** [all] Error 1
2020-03-14T01:37:40.8874897Z ------------------------------------------
2020-03-14T01:37:40.8875066Z 
2020-03-14T01:37:40.8875180Z 
2020-03-14T01:37:40.8875397Z 
---
2020-03-14T01:37:40.8877569Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-03-14T01:37:40.8878023Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-03-14T01:37:40.8882161Z 
2020-03-14T01:37:40.8882351Z 
2020-03-14T01:37:40.8893445Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--rustdoc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustdoc" "--src-base" "/checkout/src/test/run-make-fulldeps" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-make-fulldeps" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "run-make" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-7/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "7.0.0\n" "--system-llvm" "--cc" "cc" "--cxx" "c++" "--cflags" "-ffunction-sections -fdata-sections -fPIC -m64" "--llvm-components" "aarch64 aarch64asmparser aarch64asmprinter aarch64codegen aarch64desc aarch64disassembler aarch64info aarch64utils aggressiveinstcombine all all-targets amdgpu amdgpuasmparser amdgpuasmprinter amdgpucodegen amdgpudesc amdgpudisassembler amdgpuinfo amdgpuutils analysis arm armasmparser armasmprinter armcodegen armdesc armdisassembler arminfo armutils asmparser asmprinter avr avrasmparser avrasmprinter avrcodegen avrdesc avrdisassembler avrinfo binaryformat bitreader bitwriter bpf bpfasmparser bpfasmprinter bpfcodegen bpfdesc bpfdisassembler bpfinfo codegen core coroutines coverage debuginfocodeview debuginfodwarf debuginfomsf debuginfopdb demangle dlltooldriver engine executionengine fuzzmutate globalisel hexagon hexagonasmparser hexagoncodegen hexagondesc hexagondisassembler hexagoninfo instcombine instrumentation interpreter ipo irreader lanai lanaiasmparser lanaiasmprinter lanaicodegen lanaidesc lanaidisassembler lanaiinfo libdriver lineeditor linker lto mc mcdisassembler mcjit mcparser mips mipsasmparser mipsasmprinter mipscodegen mipsdesc mipsdisassembler mipsinfo mirparser msp430 msp430asmprinter msp430codegen msp430desc msp430info native nativecodegen nvptx nvptxasmprinter nvptxcodegen nvptxdesc nvptxinfo objcarcopts object objectyaml option orcjit passes perfjitevents powerpc powerpcasmparser powerpcasmprinter powerpccodegen powerpcdesc powerpcdisassembler powerpcinfo profiledata runtimedyld scalaropts selectiondag sparc sparcasmparser sparcasmprinter sparccodegen sparcdesc sparcdisassembler sparcinfo support symbolize systemz systemzasmparser systemzasmprinter systemzcodegen systemzdesc systemzdisassembler systemzinfo tablegen target transformutils vectorize webassembly webassemblyasmparser webassemblyasmprinter webassemblycodegen webassemblydesc webassemblydisassembler webassemblyinfo windowsmanifest x86 x86asmparser x86asmprinter x86codegen x86desc x86disassembler x86info x86utils xcore xcoreasmprinter xcorecodegen xcoredesc xcoredisassembler xcoreinfo" "--ar" "ar" "--llvm-bin-dir" "/usr/lib/llvm-7/bin" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-03-14T01:37:40.8902390Z 
2020-03-14T01:37:40.8902496Z 
2020-03-14T01:37:40.8902740Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-03-14T01:37:40.8903075Z Build completed unsuccessfully in 1:34:25
2020-03-14T01:37:40.8903075Z Build completed unsuccessfully in 1:34:25
2020-03-14T01:37:40.9012743Z == clock drift check ==
2020-03-14T01:37:40.9036233Z   local time: Sat Mar 14 01:37:40 UTC 2020
2020-03-14T01:37:41.2128819Z   network time: Sat, 14 Mar 2020 01:37:41 GMT
2020-03-14T01:37:41.2129319Z == end clock drift check ==
2020-03-14T01:37:43.3888204Z 
2020-03-14T01:37:43.3970093Z ##[error]Bash exited with code '1'.
2020-03-14T01:37:43.3986673Z ##[section]Finishing: Run build
2020-03-14T01:37:43.4056386Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69965/merge to s
2020-03-14T01:37:43.4062341Z Task         : Get sources
2020-03-14T01:37:43.4062687Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-14T01:37:43.4063036Z Version      : 1.0.0
2020-03-14T01:37:43.4063263Z Author       : Microsoft
2020-03-14T01:37:43.4063263Z Author       : Microsoft
2020-03-14T01:37:43.4063618Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-03-14T01:37:43.4064038Z ==============================================================================
2020-03-14T01:37:43.7778218Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-03-14T01:37:43.7826141Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69965/merge to s
2020-03-14T01:37:43.7919056Z Cleaning up task key
2020-03-14T01:37:43.7920906Z Start cleaning up orphan processes.
2020-03-14T01:37:43.8101745Z Terminate orphan process: pid (4162) (python)
2020-03-14T01:37:43.8180466Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@eddyb
Copy link
Member

eddyb commented Mar 14, 2020

@eddyb I think it mostly uses the filename stuff

If it's simple enough, could it go into rustc_session?

@mark-i-m
Copy link
Member Author

mark-i-m commented Mar 14, 2020

After I started looking at the remaining functions, most of them were easy to move to rustc_session (they were mostly filename related). I created a new module rustc_session::output and moved all but one fn there.

And then there was one... find_crate_name, which could be moved to either rustc or rustc_codegen_ssa. I opted to move it to rustc_codegen_ssa::back::link.

And then there were none 🎉

EDIT: I still need to fix tests, though...

@bjorn3
Copy link
Member

bjorn3 commented Mar 14, 2020

You served your time well my child. 😄

(I introduced rustc_trans_utils (later renamed to rustc_codegen_utils) in #44085 to break the dependency of rustc_driver on rustc_trans)

@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-03-14T19:12:20.6863991Z ========================== Starting Command Output ===========================
2020-03-14T19:12:20.6868876Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/9d264d47-fc87-4a68-9d6e-328efb07a223.sh
2020-03-14T19:12:20.6869404Z 
2020-03-14T19:12:20.6874345Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-14T19:12:20.6894778Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69965/merge to s
2020-03-14T19:12:20.6898243Z Task         : Get sources
2020-03-14T19:12:20.6898521Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-14T19:12:20.6898765Z Version      : 1.0.0
2020-03-14T19:12:20.6898933Z Author       : Microsoft
---
2020-03-14T19:12:21.6757994Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-14T19:12:21.6762545Z ##[command]git config gc.auto 0
2020-03-14T19:12:21.6765645Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-14T19:12:21.6768493Z ##[command]git config --get-all http.proxy
2020-03-14T19:12:21.6774060Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/69965/merge:refs/remotes/pull/69965/merge
---
2020-03-14T20:08:19.8700205Z ..................................................................................................F. 1700/9771
2020-03-14T20:08:24.0398467Z .................................................................................................... 1800/9771
2020-03-14T20:08:34.8073652Z ...................................................................i................................ 1900/9771
2020-03-14T20:08:41.0175348Z .................................................................................................... 2000/9771
2020-03-14T20:08:54.1717807Z .........................................................iiiii...................................... 2100/9771
2020-03-14T20:09:03.8261967Z .................................................................................................... 2300/9771
2020-03-14T20:09:05.8109464Z .................................................................................................... 2400/9771
2020-03-14T20:09:08.5361194Z .................................................................................................... 2500/9771
2020-03-14T20:09:29.0545409Z .................................................................................................... 2600/9771
---
2020-03-14T20:11:56.6953703Z .............................i...............i...................................................... 5000/9771
2020-03-14T20:12:05.7355169Z .................................................................................................... 5100/9771
2020-03-14T20:12:11.4953126Z ........................................................................i........................... 5200/9771
2020-03-14T20:12:16.6793593Z .................................................................................................... 5300/9771
2020-03-14T20:12:25.7218111Z .....................................................ii.ii........i...i............................. 5400/9771
2020-03-14T20:12:33.0542957Z .................................................................................................... 5600/9771
2020-03-14T20:12:41.7544158Z .................................................................................................... 5700/9771
2020-03-14T20:12:47.3025257Z .............................................i...................................................... 5800/9771
2020-03-14T20:12:53.1749597Z .................................................................................................... 5900/9771
2020-03-14T20:12:53.1749597Z .................................................................................................... 5900/9771
2020-03-14T20:13:02.2617322Z .................................................................................................... 6000/9771
2020-03-14T20:13:07.6744681Z .......................................ii...i..ii...........i....................................... 6100/9771
2020-03-14T20:13:26.1521918Z .................................................................................................... 6300/9771
2020-03-14T20:13:32.4206062Z .................................................................................................... 6400/9771
2020-03-14T20:13:32.4206062Z .................................................................................................... 6400/9771
2020-03-14T20:13:41.0169691Z .....................................................................i..ii.......................... 6500/9771
2020-03-14T20:14:02.5115702Z .................................................................................................... 6700/9771
2020-03-14T20:14:10.3411673Z ...................................................................i................................ 6800/9771
2020-03-14T20:14:12.1144131Z .................................................................................................... 6900/9771
2020-03-14T20:14:14.0349604Z .................................................................................................... 7000/9771
---
2020-03-14T20:15:49.0126893Z .................................................................................................... 7800/9771
2020-03-14T20:15:54.3555343Z .................................................................................................... 7900/9771
2020-03-14T20:15:59.6288589Z ...................................................i................................................ 8000/9771
2020-03-14T20:16:09.1259913Z .................................................................................................... 8100/9771
2020-03-14T20:16:14.0090300Z iiiiiiiiii.i........................................................................................ 8200/9771
2020-03-14T20:16:26.7141140Z .................................................................................................... 8400/9771
2020-03-14T20:16:36.5794538Z .................................................................................................... 8500/9771
2020-03-14T20:16:48.0391957Z .................................................................................................... 8600/9771
2020-03-14T20:16:53.3172564Z .................................................................................................... 8700/9771
---
2020-03-14T20:18:34.2516663Z 24 
2020-03-14T20:18:34.2516920Z 
2020-03-14T20:18:34.2517177Z 
2020-03-14T20:18:34.2517552Z The actual stderr differed from the expected stderr.
2020-03-14T20:18:34.2518426Z Actual stderr saved to /checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/control-flow/short-circuit.stock/short-circuit.stock.stderr
2020-03-14T20:18:34.2519319Z To update references, rerun the tests and pass the `--bless` flag
2020-03-14T20:18:34.2520150Z To only update this specific test, also pass `--test-args consts/control-flow/short-circuit.rs`
2020-03-14T20:18:34.2520599Z 
2020-03-14T20:18:34.2521298Z error in revision `stock`: 1 errors occurred comparing output.
2020-03-14T20:18:34.2521769Z status: exit code: 1
2020-03-14T20:18:34.2524148Z command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/ui/consts/control-flow/short-circuit.rs" "-Zthreads=1" "--target=x86_64-unknown-linux-gnu" "--cfg" "stock" "--error-format" "json" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/control-flow/short-circuit.stock" "-Crpath" "-O" "-Cdebuginfo=0" "-Zunstable-options" "-Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "-A" "unused" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui/consts/control-flow/short-circuit.stock/auxiliary"
2020-03-14T20:18:34.2528279Z ------------------------------------------
2020-03-14T20:18:34.2528436Z 
2020-03-14T20:18:34.2528747Z ------------------------------------------
2020-03-14T20:18:34.2529273Z stderr:
2020-03-14T20:18:34.2529273Z stderr:
2020-03-14T20:18:34.2529788Z ------------------------------------------
2020-03-14T20:18:34.2530054Z error: any use of this value will cause an error
2020-03-14T20:18:34.2530591Z   --> /checkout/src/test/ui/consts/control-flow/short-circuit.rs:10:25
2020-03-14T20:18:34.2530839Z    |
2020-03-14T20:18:34.2531134Z LL | const _: bool = true || panic!();  //[stock]~ ERROR any use of this value will cause an error
2020-03-14T20:18:34.2531886Z    |                         |
2020-03-14T20:18:34.2532717Z    |                         the evaluated program panicked at 'explicit panic', /checkout/src/test/ui/consts/control-flow/short-circuit.rs:10:25
2020-03-14T20:18:34.2533123Z    |
2020-03-14T20:18:34.2533326Z    = note: `#[deny(const_err)]` on by default
2020-03-14T20:18:34.2533326Z    = note: `#[deny(const_err)]` on by default
2020-03-14T20:18:34.2534055Z    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
2020-03-14T20:18:34.2541592Z 
2020-03-14T20:18:34.2541830Z error: any use of this value will cause an error
2020-03-14T20:18:34.2542513Z   --> /checkout/src/test/ui/consts/control-flow/short-circuit.rs:11:26
2020-03-14T20:18:34.2542815Z    |
2020-03-14T20:18:34.2543147Z LL | const _: bool = false && panic!(); //[stock]~ ERROR any use of this value will cause an error
2020-03-14T20:18:34.2543998Z    |                          |
2020-03-14T20:18:34.2544731Z    |                          the evaluated program panicked at 'explicit panic', /checkout/src/test/ui/consts/control-flow/short-circuit.rs:11:26
2020-03-14T20:18:34.2545171Z    |
2020-03-14T20:18:34.2545748Z    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
2020-03-14T20:18:34.2545748Z    = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
2020-03-14T20:18:34.2546077Z 
2020-03-14T20:18:34.2546289Z error: fatal error triggered by #[rustc_error]
2020-03-14T20:18:34.2546854Z   --> /checkout/src/test/ui/consts/control-flow/short-circuit.rs:14:1
2020-03-14T20:18:34.2547130Z    |
2020-03-14T20:18:34.2547414Z LL | fn main() {} //[if_match]~ ERROR fatal error triggered by #[rustc_error]
2020-03-14T20:18:34.2547869Z 
2020-03-14T20:18:34.2548070Z error: aborting due to 3 previous errors
2020-03-14T20:18:34.2548255Z 
2020-03-14T20:18:34.2548354Z 
---
2020-03-14T20:18:34.2551291Z thread 'main' panicked at 'Some tests failed', src/tools/compiletest/src/main.rs:348:22
2020-03-14T20:18:34.2551749Z note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2020-03-14T20:18:34.2552020Z 
2020-03-14T20:18:34.2552120Z 
2020-03-14T20:18:34.2556059Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/compiletest" "--compile-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib" "--run-lib-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/x86_64-unknown-linux-gnu/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/ui" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/ui" "--stage-id" "stage2-x86_64-unknown-linux-gnu" "--mode" "ui" "--target" "x86_64-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/usr/lib/llvm-7/bin/FileCheck" "--host-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--target-rustcflags" "-Crpath -O -Cdebuginfo=0 -Zunstable-options  -Lnative=/checkout/obj/build/x86_64-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--quiet" "--llvm-version" "7.0.0\n" "--system-llvm" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2020-03-14T20:18:34.2559010Z 
2020-03-14T20:18:34.2559101Z 
2020-03-14T20:18:34.2559321Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test
2020-03-14T20:18:34.2559640Z Build completed unsuccessfully in 1:00:36
2020-03-14T20:18:34.2559640Z Build completed unsuccessfully in 1:00:36
2020-03-14T20:18:34.2599258Z == clock drift check ==
2020-03-14T20:18:34.2623087Z   local time: Sat Mar 14 20:18:34 UTC 2020
2020-03-14T20:18:34.5580113Z   network time: Sat, 14 Mar 2020 20:18:34 GMT
2020-03-14T20:18:34.5586097Z == end clock drift check ==
2020-03-14T20:18:35.0189892Z 
2020-03-14T20:18:35.0229301Z ##[error]Bash exited with code '1'.
2020-03-14T20:18:35.0243215Z ##[section]Finishing: Run build
2020-03-14T20:18:35.0290539Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69965/merge to s
2020-03-14T20:18:35.0295436Z Task         : Get sources
2020-03-14T20:18:35.0295758Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-14T20:18:35.0296058Z Version      : 1.0.0
2020-03-14T20:18:35.0296259Z Author       : Microsoft
2020-03-14T20:18:35.0296259Z Author       : Microsoft
2020-03-14T20:18:35.0296587Z Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
2020-03-14T20:18:35.0296974Z ==============================================================================
2020-03-14T20:18:35.3565332Z Cleaning any cached credential from repository: rust-lang/rust (GitHub)
2020-03-14T20:18:35.3609541Z ##[section]Finishing: Checkout rust-lang/rust@refs/pull/69965/merge to s
2020-03-14T20:18:35.3688050Z Cleaning up task key
2020-03-14T20:18:35.3689354Z Start cleaning up orphan processes.
2020-03-14T20:18:35.3870914Z Terminate orphan process: pid (4122) (python)
2020-03-14T20:18:35.4040498Z ##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@mark-i-m
Copy link
Member Author

It seems ongoing_codegen triggers a bunch of queries for major analysis, so the check_for_rustc_errors_attr check needs to happen after those. For that reason, I have mode the function back to the rustc_interface crate after the analysis query runs.

@eddyb
Copy link
Member

eddyb commented Mar 15, 2020

@mark-i-m find_crate_name also sounds like a rustc_session thing.
I could've sworn all that code used to be in rustc::session!

@eddyb eddyb changed the title Refactorings to begin getting rid of rustc_codegen_utils Refactorings to get rid of rustc_codegen_utils Mar 15, 2020
@Centril
Copy link
Contributor

Centril commented Mar 15, 2020

Please drop 2210e12 from this PR. That commit is counter-productive. We should remove rustc::session entirely to facilitate the work towards #65031, and that commit takes us backwards.

@mark-i-m
Copy link
Member Author

@Centril Ah, I see...

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 16, 2020
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-7 of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
2020-03-16T00:13:20.4817356Z ========================== Starting Command Output ===========================
2020-03-16T00:13:20.4820179Z [command]/bin/bash --noprofile --norc /home/vsts/work/_temp/fdd17353-f487-47b1-be87-2f665dd8b1c5.sh
2020-03-16T00:13:20.4820464Z 
2020-03-16T00:13:20.4824470Z ##[section]Finishing: Disable git automatic line ending conversion
2020-03-16T00:13:20.4843661Z ##[section]Starting: Checkout rust-lang/rust@refs/pull/69965/merge to s
2020-03-16T00:13:20.4847780Z Task         : Get sources
2020-03-16T00:13:20.4848090Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
2020-03-16T00:13:20.4848387Z Version      : 1.0.0
2020-03-16T00:13:20.4848587Z Author       : Microsoft
---
2020-03-16T00:13:21.4779168Z ##[command]git remote add origin https://github.com/rust-lang/rust
2020-03-16T00:13:21.4785220Z ##[command]git config gc.auto 0
2020-03-16T00:13:21.4790819Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2020-03-16T00:13:21.4795591Z ##[command]git config --get-all http.proxy
2020-03-16T00:13:21.4803462Z ##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/69965/merge:refs/remotes/pull/69965/merge

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@eddyb
Copy link
Member

eddyb commented Mar 16, 2020

@bors r+

@bors
Copy link
Contributor

bors commented Mar 16, 2020

📌 Commit d65b3e491d191ed64605672e834737c086848e06 has been approved by eddyb

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 16, 2020
@bors

This comment has been minimized.

@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 Mar 17, 2020
@mark-i-m
Copy link
Member Author

@rustbot modify labels: -S-waiting-on-author +S-waiting-on-review

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 21, 2020
@eddyb
Copy link
Member

eddyb commented Mar 21, 2020

@mark-i-m Feel free to r= a PR you just rebased after it was approved.

@bors r+

@bors
Copy link
Contributor

bors commented Mar 21, 2020

📌 Commit 2d75a33 has been approved by eddyb

@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 Mar 21, 2020
@mark-i-m
Copy link
Member Author

@eddyb Thanks, but I don't have bors permission to do that.

@eddyb
Copy link
Member

eddyb commented Mar 21, 2020

@eddyb Thanks, but I don't have bors permission to do that.

Ah, sorry, you could PM me somewhere, in that case, just so you don't have to wait until I see it on GitHub. Nowadays I might even see messages on Zulip most of the day.

bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 21, 2020
Rollup of 8 pull requests

Successful merges:

 - rust-lang#67888 (Prefetch some queries used by the metadata encoder)
 - rust-lang#69934 (Update the mir inline costs)
 - rust-lang#69965 (Refactorings to get rid of rustc_codegen_utils)
 - rust-lang#70054 (Build dist-android with --enable-profiler)
 - rust-lang#70089 (rustc_infer: remove InferCtxt::closure_sig as the FnSig is always shallowly known.)
 - rust-lang#70092 (hir: replace "items" terminology with "nodes" where appropriate.)
 - rust-lang#70138 (do not 'return' in 'throw_' macros)
 - rust-lang#70151 (Update stdarch submodule)

Failed merges:

 - rust-lang#70074 (Expand: nix all fatal errors)

r? @ghost
@bors bors merged commit 0b99489 into rust-lang:master Mar 21, 2020
@mark-i-m mark-i-m deleted the codegen-utils branch May 6, 2020 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants