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

rustc: Link LLVM directly into rustc again (take two) #67077

Merged
merged 10 commits into from Dec 13, 2019

Conversation

Aaron1011
Copy link
Member

This is a continuation of PR #65703

@rust-highfive
Copy link
Collaborator

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 6, 2019
@Aaron1011
Copy link
Member Author

Aaron1011 commented Dec 6, 2019

@alexcrichton: I can't reproduce the old PR's CI failure locally. Could we run a try-build to see if it's still an issue?

@michaelwoerister
Copy link
Member

@bors try

@bors
Copy link
Contributor

bors commented Dec 6, 2019

⌛ Trying commit 408e3cf with merge a8af2bc...

bors added a commit that referenced this pull request Dec 6, 2019
rustc: Link LLVM directly into rustc again (take two)

This is a continuation of PR #65703
@rust-highfive
Copy link
Collaborator

The job dist-x86_64-linux-alt 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.
2019-12-06T10:20:49.6157622Z    Compiling tempfile v3.1.0
2019-12-06T10:20:53.0602335Z    Compiling rustc-rayon v0.3.0
2019-12-06T10:20:56.3491538Z    Compiling rustdoc v0.0.0 (/checkout/src/librustdoc)
2019-12-06T10:22:49.5959473Z    Compiling rustdoc-tool v0.0.0 (/checkout/src/tools/rustdoc)
2019-12-06T10:22:50.6991886Z error: linking with `clang` failed: exit code: 1
2019-12-06T10:22:50.6992436Z   |
2019-12-06T10:22:50.7004215Z   = note: "clang" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/rustdoc_tool_binary-a6decf92f45e0961.rustdoc_tool_binary.1krnrsqr-cgu.0.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/rustdoc_tool_binary-a6decf92f45e0961.rustdoc_tool_binary.1krnrsqr-cgu.1.rcgu.o" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/rustdoc_tool_binary-a6decf92f45e0961" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/release/deps" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/librustdoc-960b6cf3c3ad8e99.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/librustc_rayon-7e3943ef192c37ef.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/librustc_rayon_core-65ad84efdadadf6a.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libnum_cpus-4b54eb7a8f3f83ce.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libcrossbeam_queue-14d444c204f9fbd9.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libeither-1655dbeb6e62aa6d.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libcrossbeam_deque-821335de0517e714.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libcrossbeam_epoch-8ebccd476941cdfc.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libscopeguard-7d54bfb17498e4e6.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libmemoffset-20acb2bfa685e3ba.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libcrossbeam_utils-359bd1eea1de58a3.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libarrayvec-aaafccd3d546b5a9.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libnodrop-1389e34d7d2a0d03.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libtempfile-52115dc650ef40c8.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/librand-e8d41b020a097847.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/librand_chacha-5c68dd4cc35b20c2.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libc2_chacha-10ad836a12485dde.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libppv_lite86-2c0f0dfa10aa2267.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/liblazy_static-a7c46e9b0576ffbf.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/librand_core-0b111d7b1e38c9d2.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libgetrandom-e9fc3c0a4f51b2b1.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/liblibc-32c03d01f2b24ddc.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libremove_dir_all-35e80912bea784bf.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libcfg_if-ace2aa463ecabc97.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libminifier-0d6d1d040d31f091.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libmacro_utils-3745ed3786f2ba72.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libpulldown_cmark-668afe0a0c3dab2d.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libmemchr-6059bde70569626b.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libunicase-aae51b33df65e59e.rlib" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools/x86_64-unknown-linux-gnu/release/deps/libbitflags-b836077f9f611e64.rlib" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bdynamic" "-lrustc_driver-5d1b4ea389fbdbd7" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-ltest-452a4c53665567a2" "-Wl,--start-group" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lstd-16200cf384764ff2" "-Wl,--end-group" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-sysroot/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-0b4afa0039f92915.rlib" "-Wl,-Bdynamic" "-lutil" "-lutil" "-lLLVM-9-rust-1.41.0-nightly" "-lutil" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil" "-Wl,-rpath,$ORIGIN/../lib"
2019-12-06T10:22:50.7008710Z   = note: /rustroot/bin/ld: cannot find -lLLVM-9-rust-1.41.0-nightly
2019-12-06T10:22:50.7009461Z           clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
2019-12-06T10:22:50.7011323Z 
2019-12-06T10:22:50.7011971Z error: aborting due to previous error
2019-12-06T10:22:50.7012946Z 
2019-12-06T10:22:50.7013256Z error: could not compile `rustdoc-tool`.
---
2019-12-06T10:22:50.7016379Z   local time: Fri Dec  6 10:22:49 UTC 2019
2019-12-06T10:22:50.7016480Z   network time: Fri, 06 Dec 2019 10:22:50 GMT
2019-12-06T10:22:50.7016559Z == end clock drift check ==
2019-12-06T10:22:52.1996942Z 
2019-12-06T10:22:52.2062008Z ##[error]Bash exited with code '1'.
2019-12-06T10:22:52.2101684Z ##[section]Starting: Checkout
2019-12-06T10:22:52.2103841Z ==============================================================================
2019-12-06T10:22:52.2103944Z Task         : Get sources
2019-12-06T10:22:52.2104049Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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 @TimNN. (Feature Requests)

@bors
Copy link
Contributor

bors commented Dec 6, 2019

💔 Test failed - checks-azure

@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-review Status: Awaiting review from the assignee but also interested parties. labels Dec 6, 2019
@bjorn3
Copy link
Member

bjorn3 commented Dec 6, 2019

When not merging this PR, it would be possible to rewrite https://github.com/getditto/rust-bitcode to only recompile the codegen backend, instead of a whole rust compiler by using -Zcodegen-backend.

@alexcrichton
Copy link
Member

I'd recommend enabling the try builder as part of this PR itself, you can edit the configuration for builders on PRs so that way you can test through a PR if you're unable to test it locally.

@bors
Copy link
Contributor

bors commented Dec 6, 2019

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

@Aaron1011
Copy link
Member Author

I've managed to reproduce the issue locally via TF_BUILD=True ./src/ci/docker/run.sh dist-x86_64-linux

@Aaron1011
Copy link
Member Author

@alexcrichton: I believe I've fixed the issue. It didn't show up locally because I was statically linking LLVM, instead of dynamicly linking against libLLVM.so

@rust-highfive
Copy link
Collaborator

The job mingw-check 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.
2019-12-07T02:17:02.8921749Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-07T02:17:02.9066475Z ##[command]git config gc.auto 0
2019-12-07T02:17:02.9142437Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-07T02:17:02.9201569Z ##[command]git config --get-all http.proxy
2019-12-07T02:17:02.9351580Z ##[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/67077/merge:refs/remotes/pull/67077/merge
---
2019-12-07T02:25:22.3487915Z 
2019-12-07T02:25:22.3789744Z error: could not compile `rustc_codegen_llvm`.
2019-12-07T02:25:22.3790201Z warning: build failed, waiting for other jobs to finish...
2019-12-07T02:25:25.8415853Z error: build failed
2019-12-07T02:25:25.8443741Z command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "-Zconfig-profile" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--color" "always" "--features" " llvm" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
2019-12-07T02:25:25.8451364Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
2019-12-07T02:25:25.8451526Z Build completed unsuccessfully in 0:05:07
2019-12-07T02:25:25.8509400Z == clock drift check ==
2019-12-07T02:25:25.8523267Z   local time: Sat Dec  7 02:25:25 UTC 2019
2019-12-07T02:25:25.8523267Z   local time: Sat Dec  7 02:25:25 UTC 2019
2019-12-07T02:25:26.1443414Z   network time: Sat, 07 Dec 2019 02:25:26 GMT
2019-12-07T02:25:26.1443962Z == end clock drift check ==
2019-12-07T02:25:27.5629485Z 
2019-12-07T02:25:27.5730348Z ##[error]Bash exited with code '1'.
2019-12-07T02:25:27.5785913Z ##[section]Starting: Checkout
2019-12-07T02:25:27.5787553Z ==============================================================================
2019-12-07T02:25:27.5787627Z Task         : Get sources
2019-12-07T02:25:27.5787670Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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 @TimNN. (Feature Requests)

@rust-highfive
Copy link
Collaborator

The job dist-x86_64-linux-alt 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.
2019-12-07T06:26:09.4877126Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-12-07T06:26:09.4904553Z ##[command]git config gc.auto 0
2019-12-07T06:26:09.4909462Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-12-07T06:26:09.4914499Z ##[command]git config --get-all http.proxy
2019-12-07T06:26:09.4920608Z ##[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/67077/merge:refs/remotes/pull/67077/merge
---
2019-12-07T07:24:52.8452680Z    Compiling rustc_codegen_ssa v0.0.0 (/checkout/src/librustc_codegen_ssa)
2019-12-07T07:25:41.8918426Z    Compiling rustc_save_analysis v0.0.0 (/checkout/src/librustc_save_analysis)
2019-12-07T07:28:21.8847609Z    Compiling rustc-main v0.0.0 (/checkout/src/rustc)
2019-12-07T07:28:22.4905685Z     Finished release [optimized] target(s) in 21m 43s
2019-12-07T07:28:22.5604292Z Installing libLLVM.so to stage 0 (x86_64-unknown-linux-gnu)
2019-12-07T07:28:23.9810991Z Building LLD for x86_64-unknown-linux-gnu
2019-12-07T07:28:23.9839058Z running: "cmake" "/checkout/src/llvm-project/lld" "-DCMAKE_INSTALL_MESSAGE=LAZY" "-DCMAKE_C_COMPILER_LAUNCHER=sccache" "-DCMAKE_CXX_COMPILER_LAUNCHER=sccache" "-DCMAKE_C_COMPILER=clang" "-DCMAKE_CXX_COMPILER=clang++" "-DCMAKE_C_FLAGS=-ffunction-sections -fdata-sections -fPIC --target=x86_64-unknown-linux-gnu -fdebug-prefix-map=/checkout=/rustc/llvm" "-DCMAKE_CXX_FLAGS=-ffunction-sections -fdata-sections -fPIC --target=x86_64-unknown-linux-gnu -fdebug-prefix-map=/checkout=/rustc/llvm -static-libstdc++" "-DCMAKE_AR=/rustroot/bin/llvm-ar" "-DLLVM_CONFIG_PATH=/checkout/obj/build/bootstrap/debug/llvm-config-wrapper" "-DLLVM_INCLUDE_TESTS=OFF" "-DCMAKE_INSTALL_PREFIX=/checkout/obj/build/x86_64-unknown-linux-gnu/lld" "-DCMAKE_BUILD_TYPE=Release"
2019-12-07T07:28:24.1068785Z -- The C compiler identification is Clang 9.0.0
2019-12-07T07:28:24.2283737Z -- The CXX compiler identification is Clang 9.0.0
---
2019-12-07T08:04:17.2318384Z     Checking once_cell v1.1.0
2019-12-07T08:04:17.2761112Z  Documenting rustc_fs_util v0.0.0 (/checkout/src/librustc_fs_util)
2019-12-07T08:04:17.3017877Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:04:17.3018176Z   |
2019-12-07T08:04:17.3019111Z   = warning: please see ***/issues/44136
2019-12-07T08:04:17.3032184Z  Documenting graphviz v0.0.0 (/checkout/src/libgraphviz)
2019-12-07T08:04:17.3268860Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:04:17.3269139Z   |
2019-12-07T08:04:17.3269139Z   |
2019-12-07T08:04:17.3269573Z   = warning: please see ***/issues/44136
2019-12-07T08:04:17.3280587Z  Documenting rustc_error_codes v0.0.0 (/checkout/src/librustc_error_codes)
2019-12-07T08:04:17.3491990Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:04:17.3492248Z   |
2019-12-07T08:04:17.3492248Z   |
2019-12-07T08:04:17.3492641Z   = warning: please see ***/issues/44136
2019-12-07T08:04:17.3503900Z  Documenting build_helper v0.1.0 (/checkout/src/build_helper)
2019-12-07T08:04:17.3717143Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:04:17.3717474Z   |
2019-12-07T08:04:17.3717474Z   |
2019-12-07T08:04:17.3717862Z   = warning: please see ***/issues/44136
2019-12-07T08:04:17.3730936Z     Checking crossbeam-utils v0.6.5
2019-12-07T08:04:17.3985430Z     Checking log_settings v0.1.2
2019-12-07T08:04:17.4226464Z     Checking lock_api v0.3.1
2019-12-07T08:04:17.4487462Z     Checking arrayvec v0.4.7
2019-12-07T08:04:17.4487462Z     Checking arrayvec v0.4.7
2019-12-07T08:04:17.7630733Z     Checking serialize v0.0.0 (/checkout/src/libserialize)
2019-12-07T08:04:17.7883626Z  Documenting serialize v0.0.0 (/checkout/src/libserialize)
2019-12-07T08:04:17.8301480Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:04:17.8301791Z   |
2019-12-07T08:04:17.8302220Z   = warning: please see ***/issues/44136
2019-12-07T08:04:17.8337644Z     Checking itertools v0.8.0
2019-12-07T08:04:17.8575052Z    Compiling rustc_target v0.0.0 (/checkout/src/librustc_target)
2019-12-07T08:04:17.8665895Z    Compiling syntax v0.0.0 (/checkout/src/libsyntax)
2019-12-07T08:04:17.8729666Z    Compiling rustc v0.0.0 (/checkout/src/librustc)
---
2019-12-07T08:04:33.2586123Z     Checking rustc_apfloat v0.0.0 (/checkout/src/librustc_apfloat)
2019-12-07T08:04:33.2879580Z  Documenting rustc_apfloat v0.0.0 (/checkout/src/librustc_apfloat)
2019-12-07T08:04:33.3109277Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:04:33.3110587Z   |
2019-12-07T08:04:33.3111428Z   = warning: please see ***/issues/44136
2019-12-07T08:04:33.3168619Z     Checking rustc_index v0.0.0 (/checkout/src/librustc_index)
2019-12-07T08:04:34.8867112Z  Documenting rustc_index v0.0.0 (/checkout/src/librustc_index)
2019-12-07T08:04:34.9128825Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:04:34.9129794Z   |
2019-12-07T08:04:34.9129794Z   |
2019-12-07T08:04:34.9130573Z   = warning: please see ***/issues/44136
2019-12-07T08:04:36.1969016Z     Checking memoffset v0.5.1
2019-12-07T08:04:39.6540962Z     Checking rls-span v0.5.1
2019-12-07T08:04:39.6884344Z     Checking ena v0.13.1
2019-12-07T08:04:39.7158776Z     Checking env_logger v0.7.1
2019-12-07T08:04:39.7158776Z     Checking env_logger v0.7.1
2019-12-07T08:04:40.6026950Z     Checking rls-data v0.19.0
2019-12-07T08:04:42.0885360Z     Checking rustc-hash v1.0.1
2019-12-07T08:04:42.1213200Z     Checking rustc_lexer v0.1.0 (/checkout/src/librustc_lexer)
2019-12-07T08:04:42.5091381Z  Documenting rustc_lexer v0.1.0 (/checkout/src/librustc_lexer)
2019-12-07T08:04:42.5426306Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:04:42.5426662Z   |
2019-12-07T08:04:42.5427082Z   = warning: please see ***/issues/44136
2019-12-07T08:04:42.5564126Z     Checking polonius-engine v0.10.0
2019-12-07T08:04:43.3013465Z  Documenting rustc_llvm v0.0.0 (/checkout/src/librustc_llvm)
2019-12-07T08:04:43.3303990Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:04:43.3304442Z   |
2019-12-07T08:04:43.3304442Z   |
2019-12-07T08:04:43.3304954Z   = warning: please see ***/issues/44136
2019-12-07T08:04:43.3395205Z     Checking crossbeam-epoch v0.7.2
2019-12-07T08:04:43.3673821Z     Checking serde_json v1.0.40
2019-12-07T08:04:43.6272460Z     Checking miniz_oxide v0.3.5
2019-12-07T08:04:44.0511094Z     Checking num_cpus v1.10.1
---
2019-12-07T08:04:51.6199648Z     Checking rustc_data_structures v0.0.0 (/checkout/src/librustc_data_structures)
2019-12-07T08:04:51.6428779Z  Documenting rustc_data_structures v0.0.0 (/checkout/src/librustc_data_structures)
2019-12-07T08:04:51.6702845Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:04:51.6703131Z   |
2019-12-07T08:04:51.6703576Z   = warning: please see ***/issues/44136
2019-12-07T08:04:54.1181843Z warning: `[0]` cannot be resolved, ignoring it.
2019-12-07T08:04:54.1182228Z    --> src/librustc_data_structures/obligation_forest/mod.rs:178:29
2019-12-07T08:04:54.1182439Z     |
2019-12-07T08:04:54.1182740Z 178 |     /// If true, dependents[0] points to a "parent" node, which requires
---
2019-12-07T08:04:56.3450033Z     Checking arena v0.0.0 (/checkout/src/libarena)
2019-12-07T08:04:56.3746455Z  Documenting arena v0.0.0 (/checkout/src/libarena)
2019-12-07T08:04:56.4022374Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:04:56.4022717Z   |
2019-12-07T08:04:56.4023239Z   = warning: please see ***/issues/44136
2019-12-07T08:04:57.7367719Z     Checking rand v0.7.0
2019-12-07T08:04:57.7645108Z     Checking syntax_pos v0.0.0 (/checkout/src/libsyntax_pos)
2019-12-07T08:04:59.3124700Z  Documenting syntax_pos v0.0.0 (/checkout/src/libsyntax_pos)
2019-12-07T08:04:59.3353715Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:04:59.3353715Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:04:59.3354062Z   |
2019-12-07T08:04:59.3354456Z   = warning: please see ***/issues/44136
2019-12-07T08:04:59.3423588Z     Checking tempfile v3.1.0
2019-12-07T08:04:59.8873775Z     Checking synstructure v0.12.1
2019-12-07T08:05:00.5631541Z     Checking rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2019-12-07T08:05:01.0730727Z     Checking rustc_errors v0.0.0 (/checkout/src/librustc_errors)
---
2019-12-07T08:05:01.5709379Z 
2019-12-07T08:05:01.9172610Z  Documenting rustc_feature v0.0.0 (/checkout/src/librustc_feature)
2019-12-07T08:05:01.9426985Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:05:01.9428166Z   |
2019-12-07T08:05:01.9428857Z   = warning: please see ***/issues/44136
2019-12-07T08:05:02.1815917Z  Documenting rustc_errors v0.0.0 (/checkout/src/librustc_errors)
2019-12-07T08:05:02.2067362Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:05:02.2068649Z   |
2019-12-07T08:05:02.2068649Z   |
2019-12-07T08:05:02.2069288Z   = warning: please see ***/issues/44136
2019-12-07T08:05:02.5378252Z  Documenting fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
2019-12-07T08:05:02.5623115Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:05:02.5623420Z   |
2019-12-07T08:05:02.5623420Z   |
2019-12-07T08:05:02.5623865Z   = warning: please see ***/issues/44136
2019-12-07T08:05:02.5713098Z  Documenting rustc_target v0.0.0 (/checkout/src/librustc_target)
2019-12-07T08:05:02.5939438Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:05:02.5939741Z   |
2019-12-07T08:05:02.5939741Z   |
2019-12-07T08:05:02.5940185Z   = warning: please see ***/issues/44136
2019-12-07T08:05:04.1725660Z  Documenting rustc_macros v0.1.0 (/checkout/src/librustc_macros)
2019-12-07T08:05:08.1177883Z     Checking rustc_session v0.0.0 (/checkout/src/librustc_session)
2019-12-07T08:05:08.1685552Z  Documenting rustc_session v0.0.0 (/checkout/src/librustc_session)
2019-12-07T08:05:08.1919114Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:05:08.1919114Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:05:08.1919469Z   |
2019-12-07T08:05:08.1919897Z   = warning: please see ***/issues/44136
2019-12-07T08:05:09.8930361Z  Documenting syntax v0.0.0 (/checkout/src/libsyntax)
2019-12-07T08:05:09.9174002Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:05:09.9174378Z   |
2019-12-07T08:05:09.9174378Z   |
2019-12-07T08:05:09.9174893Z   = warning: please see ***/issues/44136
2019-12-07T08:05:16.4276902Z     Checking rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2019-12-07T08:05:17.1200185Z warning: `[MacDelimeter]` cannot be resolved, ignoring it.
2019-12-07T08:05:17.1200648Z   --> src/libsyntax/ast.rs:17:49
2019-12-07T08:05:17.1200901Z    |
---
2019-12-07T08:05:17.1617210Z 
2019-12-07T08:05:20.7485624Z  Documenting rustc_parse v0.0.0 (/checkout/src/librustc_parse)
2019-12-07T08:05:20.8174102Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:05:20.8174464Z   |
2019-12-07T08:05:20.8174864Z   = warning: please see ***/issues/44136
2019-12-07T08:05:20.8401040Z  Documenting rustc v0.0.0 (/checkout/src/librustc)
2019-12-07T08:05:20.8660521Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:05:20.8660946Z   |
2019-12-07T08:05:20.8660946Z   |
2019-12-07T08:05:20.8661369Z   = warning: please see ***/issues/44136
2019-12-07T08:05:23.3132805Z error: unknown start of token: `
2019-12-07T08:05:23.3133594Z  --> <doctest>:1:13
2019-12-07T08:05:23.3133683Z   |
2019-12-07T08:05:23.3133800Z 1 | USE_TREE = [`::`] `*` |
---
2019-12-07T08:05:23.6091245Z     Checking syntax_expand v0.0.0 (/checkout/src/libsyntax_expand)
2019-12-07T08:06:02.9738659Z  Documenting syntax_expand v0.0.0 (/checkout/src/libsyntax_expand)
2019-12-07T08:06:03.0002259Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:06:03.0003224Z   |
2019-12-07T08:06:03.0003923Z   = warning: please see ***/issues/44136
2019-12-07T08:06:06.1793646Z     Checking rustc_typeck v0.0.0 (/checkout/src/librustc_typeck)
2019-12-07T08:06:06.2270353Z     Checking rustc_mir v0.0.0 (/checkout/src/librustc_mir)
2019-12-07T08:06:14.6933498Z     Checking rustc_lint v0.0.0 (/checkout/src/librustc_lint)
2019-12-07T08:06:14.7253710Z     Checking rustc_passes v0.0.0 (/checkout/src/librustc_passes)
---
2019-12-07T08:06:20.0674141Z     Checking rustc_traits v0.0.0 (/checkout/src/librustc_traits)
2019-12-07T08:06:20.0983161Z  Documenting rustc_passes v0.0.0 (/checkout/src/librustc_passes)
2019-12-07T08:06:20.1252210Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:06:20.1252510Z   |
2019-12-07T08:06:20.1252917Z   = warning: please see ***/issues/44136
2019-12-07T08:06:20.1283648Z  Documenting rustc_incremental v0.0.0 (/checkout/src/librustc_incremental)
2019-12-07T08:06:20.1625770Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:06:20.1626100Z   |
2019-12-07T08:06:20.1626100Z   |
2019-12-07T08:06:20.1626495Z   = warning: please see ***/issues/44136
2019-12-07T08:06:34.8558780Z  Documenting rustc_mir v0.0.0 (/checkout/src/librustc_mir)
2019-12-07T08:06:34.8803115Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:06:34.8804175Z   |
2019-12-07T08:06:34.8804175Z   |
2019-12-07T08:06:34.8804975Z   = warning: please see ***/issues/44136
2019-12-07T08:06:34.8871888Z  Documenting rustc_typeck v0.0.0 (/checkout/src/librustc_typeck)
2019-12-07T08:06:34.9413196Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:06:34.9414107Z   |
2019-12-07T08:06:34.9414107Z   |
2019-12-07T08:06:34.9415617Z   = warning: please see ***/issues/44136
2019-12-07T08:06:34.9562671Z  Documenting rustc_traits v0.0.0 (/checkout/src/librustc_traits)
2019-12-07T08:06:35.0421596Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:06:35.0424301Z   |
2019-12-07T08:06:35.0424301Z   |
2019-12-07T08:06:35.0424757Z   = warning: please see ***/issues/44136
2019-12-07T08:06:50.2014787Z warning: `[link_reborrowed_region]` cannot be resolved, ignoring it.
2019-12-07T08:06:50.2015163Z     --> src/librustc_typeck/check/regionck.rs:1281:45
2019-12-07T08:06:50.2015781Z      |
2019-12-07T08:06:50.2019928Z 1281 |     /// of the borrow that's provided. See [link_reborrowed_region] for some
---
2019-12-07T08:06:50.2411826Z 
2019-12-07T08:06:50.9879803Z  Documenting rustc_lint v0.0.0 (/checkout/src/librustc_lint)
2019-12-07T08:06:51.0136354Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:06:51.0136738Z   |
2019-12-07T08:06:51.0137183Z   = warning: please see ***/issues/44136
2019-12-07T08:07:02.5276179Z warning: `[rustc::traits::query::implied_outlives_bounds]` cannot be resolved, ignoring it.
2019-12-07T08:07:02.5276565Z  --> src/librustc_traits/implied_outlives_bounds.rs:2:44
2019-12-07T08:07:02.5276771Z   |
2019-12-07T08:07:02.5277064Z 2 | //! Do not call this query directory. See [`rustc::traits::query::implied_outlives_bounds`].
---
2019-12-07T08:07:02.8267392Z     Checking syntax_ext v0.0.0 (/checkout/src/libsyntax_ext)
2019-12-07T08:07:02.8587909Z  Documenting rustc_metadata v0.0.0 (/checkout/src/librustc_metadata)
2019-12-07T08:07:02.9027342Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:07:02.9027681Z   |
2019-12-07T08:07:02.9028152Z   = warning: please see ***/issues/44136
2019-12-07T08:07:11.7786149Z  Documenting syntax_ext v0.0.0 (/checkout/src/libsyntax_ext)
2019-12-07T08:07:11.8044696Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:07:11.8045014Z   |
2019-12-07T08:07:11.8045014Z   |
2019-12-07T08:07:11.8045495Z   = warning: please see ***/issues/44136
2019-12-07T08:07:11.8069999Z     Checking rustc_privacy v0.0.0 (/checkout/src/librustc_privacy)
2019-12-07T08:07:11.8408445Z  Documenting rustc_privacy v0.0.0 (/checkout/src/librustc_privacy)
2019-12-07T08:07:11.8660251Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:07:11.8660654Z   |
2019-12-07T08:07:11.8660654Z   |
2019-12-07T08:07:11.8661127Z   = warning: please see ***/issues/44136
2019-12-07T08:07:24.8747344Z warning: `[lifetime]` cannot be resolved, ignoring it.
2019-12-07T08:07:24.8748627Z    --> src/libsyntax_ext/deriving/generic/ty.rs:103:25
2019-12-07T08:07:24.8749387Z     |
2019-12-07T08:07:24.8750473Z 103 |     /// mod::mod::Type<[lifetime], [Params...]>, including a plain type
---
2019-12-07T08:07:28.8077760Z     Checking rustc_plugin_impl v0.0.0 (/checkout/src/librustc_plugin_impl)
2019-12-07T08:07:28.8430980Z  Documenting rustc_codegen_utils v0.0.0 (/checkout/src/librustc_codegen_utils)
2019-12-07T08:07:28.9342803Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:07:28.9343265Z   |
2019-12-07T08:07:28.9343682Z   = warning: please see ***/issues/44136
2019-12-07T08:07:29.1450341Z  Documenting rustc_plugin_impl v0.0.0 (/checkout/src/librustc_plugin_impl)
2019-12-07T08:07:29.1709306Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:07:29.1709637Z   |
2019-12-07T08:07:29.1709637Z   |
2019-12-07T08:07:29.1710122Z   = warning: please see ***/issues/44136
2019-12-07T08:07:29.1722091Z  Documenting rustc_resolve v0.0.0 (/checkout/src/librustc_resolve)
2019-12-07T08:07:29.2024273Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:07:29.2024605Z   |
2019-12-07T08:07:29.2024605Z   |
2019-12-07T08:07:29.2025160Z   = warning: please see ***/issues/44136
2019-12-07T08:07:29.9538871Z     Checking rustc_save_analysis v0.0.0 (/checkout/src/librustc_save_analysis)
2019-12-07T08:07:29.9856348Z  Documenting rustc_save_analysis v0.0.0 (/checkout/src/librustc_save_analysis)
2019-12-07T08:07:30.0107918Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:07:30.0108322Z   |
2019-12-07T08:07:30.0108322Z   |
2019-12-07T08:07:30.0108784Z   = warning: please see ***/issues/44136
2019-12-07T08:07:34.2010920Z warning: `[rustc_error]` cannot be resolved, ignoring it.
2019-12-07T08:07:34.2011636Z   --> src/librustc_codegen_utils/lib.rs:38:21
2019-12-07T08:07:34.2011859Z    |
2019-12-07T08:07:34.2012173Z 38 | /// check for the #[rustc_error] annotation, which forces an
---
2019-12-07T08:07:35.7333219Z     Checking rustc_codegen_ssa v0.0.0 (/checkout/src/librustc_codegen_ssa)
2019-12-07T08:07:35.7616266Z  Documenting rustc_codegen_ssa v0.0.0 (/checkout/src/librustc_codegen_ssa)
2019-12-07T08:07:35.7880496Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:07:35.7880870Z   |
2019-12-07T08:07:35.7881289Z   = warning: please see ***/issues/44136
2019-12-07T08:07:38.6875753Z error: unknown start of token: `
2019-12-07T08:07:38.6877673Z  --> <doctest>:3:27
2019-12-07T08:07:38.6877937Z   |
2019-12-07T08:07:38.6883794Z 3 |    |     ^^^ did you mean `self::foo`?
---
2019-12-07T08:07:38.7490629Z 
2019-12-07T08:07:40.1713032Z  Documenting rustc_codegen_llvm v0.0.0 (/checkout/src/librustc_codegen_llvm)
2019-12-07T08:07:40.2015957Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:07:40.2016975Z   |
2019-12-07T08:07:40.2028470Z   = warning: please see ***/issues/44136
2019-12-07T08:07:43.3659552Z warning: `[no_mangle]` cannot be resolved, ignoring it.
2019-12-07T08:07:43.3660300Z   --> src/librustc_codegen_ssa/traits/declare.rs:34:44
2019-12-07T08:07:43.3660704Z    |
2019-12-07T08:07:43.3661027Z 34 |     /// to user’s fault (e.g., misuse of #[no_mangle] or #[export_name] attributes).
---
2019-12-07T08:07:43.3745573Z 
2019-12-07T08:07:44.8748001Z  Documenting rustc_interface v0.0.0 (/checkout/src/librustc_interface)
2019-12-07T08:07:44.9058442Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:07:44.9058788Z   |
2019-12-07T08:07:44.9059224Z   = warning: please see ***/issues/44136
2019-12-07T08:07:48.0191222Z warning: `[T]` cannot be resolved, ignoring it.
2019-12-07T08:07:48.0191666Z   --> src/librustc_codegen_llvm/context.rs:61:36
2019-12-07T08:07:48.0191915Z    |
2019-12-07T08:07:48.0192238Z 61 |     /// Val is a Value holding a *[T].
---
2019-12-07T08:07:48.0204844Z 
2019-12-07T08:07:48.8061547Z  Documenting rustc_driver v0.0.0 (/checkout/src/librustc_driver)
2019-12-07T08:07:48.8605104Z warning: the 'passes' flag is considered deprecated
2019-12-07T08:07:48.8605476Z   |
2019-12-07T08:07:48.8605896Z   = warning: please see ***/issues/44136
2019-12-07T08:07:53.8757667Z     Finished release [optimized] target(s) in 3m 40s
2019-12-07T08:07:53.8980960Z Documenting stage2 rustdoc (x86_64-unknown-linux-gnu)
2019-12-07T08:07:54.4959216Z     Checking cfg-if v0.1.8
2019-12-07T08:07:54.4959658Z     Checking lazy_static v1.3.0
---
2019-12-07T08:57:17.3796826Z -rw-r--r-- 1 vsts docker  18M Dec  7 08:57 rust-std-nightly-x86_64-unknown-linux-gnu.tar.xz
2019-12-07T08:57:17.3797009Z 
2019-12-07T08:57:17.3797510Z src/ci/scripts/upload-artifacts.sh: line 39: DEPLOY_BUCKET: unbound variable
2019-12-07T08:57:17.3802778Z 
2019-12-07T08:57:17.3939756Z ##[error]Bash exited with code '1'.
2019-12-07T08:57:17.3964731Z ##[section]Starting: Checkout
2019-12-07T08:57:17.3966766Z ==============================================================================
2019-12-07T08:57:17.3966852Z Task         : Get sources
2019-12-07T08:57:17.3966905Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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 @TimNN. (Feature Requests)

@Aaron1011
Copy link
Member Author

Aaron1011 commented Dec 7, 2019

It looks like this actually passed, but failed due to the weird CI change.

@alexcrichton: I think this is ready to merge

@alexcrichton
Copy link
Member

Ok great! Want to back out the CI changes?

Additionally, there's another call to dist::maybe_install_llvm_dylib, but should this one be the source of truth? Should the one in Assemble get removed?

@Aaron1011
Copy link
Member Author

@alexcrichton: The existing call to maybe_install_llvm_dylib is a little different - it is run during Assemble, and is responsible for copying LLVM into the next stage - e.g. when we are copying stage0 artifacts into the stage dir. This ensures that LLVM exists when we run the build stage (e.g. start running stage rustc).

The new call to maybe_install_llvm_dylib is specifically for stage0 - it is responsible for installing LLVM to the existing stage0, so that tools building against stage0 can see it. This is the wrong behavior for subsequent stages - we don't want to copy LLVM into the current sysroot directory - we want to to be copied into the built n + 1 sysroot, so it can used by that compiler.

@Aaron1011
Copy link
Member Author

I've added a comment to the existing call explaining what it does.

@michaelwoerister
Copy link
Member

I just noticed that this might interact with how we do ThinLTO on the LLVM code which gives us something like a 10% performance boost. Is that still possible now?

@Aaron1011
Copy link
Member Author

@michaelwoerister: I'm not quite sure what you mean - are you saying we currently get a 10% performance boost, or that this PR might give us a 10% performance boost?

This PR does not affect how LLVM itself is built (e.g. whether it's statically or dynamically linked into librustc_codegen_llvm. However, it does open up the possibility of doing cross-language LTO with both Rust and LLVM (since librustc_codegen_llvm is now built as a normal crate).

@nikic
Copy link
Contributor

nikic commented Dec 10, 2019

We should probably at least to a perf run, it looks like neither this nor the previous PR had one.

@bors try @rust-timer queue

@rust-timer
Copy link
Collaborator

Awaiting bors try build completion

@bors
Copy link
Contributor

bors commented Dec 10, 2019

⌛ Trying commit ab73c4c6bd3886f05e616610e07ee79695665ab3 with merge 643b73eedf9eb3b55040ec8e87b78b191900f6a0...

@bors
Copy link
Contributor

bors commented Dec 11, 2019

📌 Commit 150d328 has been approved by alexcrichton

@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 Dec 11, 2019
@bors
Copy link
Contributor

bors commented Dec 12, 2019

⌛ Testing commit 150d328 with merge e02eae73182f4e83beeb13a16f1c41fdece59c2c...

@rust-highfive
Copy link
Collaborator

The job x86_64-mingw-1 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.
2019-12-12T07:10:53.7079214Z WINDIR=C:\windows
2019-12-12T07:10:53.7079299Z WIX=C:\Program Files (x86)\WiX Toolset v3.11\
2019-12-12T07:10:53.7079517Z _=/usr/bin/printenv
2019-12-12T07:10:53.7079599Z agent.jobstatus=Succeeded
2019-12-12T07:10:53.7079674Z rustc: Link LLVM directly into rustc again (take two)
2019-12-12T07:10:53.7079856Z disk usage:
2019-12-12T07:10:53.7687474Z Filesystem            Size  Used Avail Use% Mounted on
2019-12-12T07:10:53.7696215Z C:/Program Files/Git  256G  143G  114G  56% /
2019-12-12T07:10:53.7696350Z D:                     14G  2.0G   13G  15% /d
---
2019-12-12T08:06:04.4251987Z [RUSTC-TIMING] rustc_driver test:false 70.068
2019-12-12T08:06:04.4416788Z    Compiling rustc-main v0.0.0 (D:\a\1\s\src\rustc)
2019-12-12T08:06:05.0944694Z [RUSTC-TIMING] rustc_binary test:false 0.635
2019-12-12T08:06:05.1129942Z     Finished release [optimized] target(s) in 28m 28s
2019-12-12T08:06:05.2068797Z Installing libLLVM.so to stage 0 (x86_64-pc-windows-gnu)
2019-12-12T08:06:05.2650932Z [TIMING] Rustc { target: "x86_64-pc-windows-gnu", compiler: Compiler { stage: 0, host: "x86_64-pc-windows-gnu" } } -- 1708.872
2019-12-12T08:06:05.2675454Z Assembling stage1 compiler (x86_64-pc-windows-gnu)
2019-12-12T08:06:05.3028612Z Building stage1 std artifacts (x86_64-pc-windows-gnu -> x86_64-pc-windows-gnu)
2019-12-12T08:06:05.8746012Z    Compiling cc v1.0.47
---
2019-12-12T09:08:36.4960663Z [RUSTC-TIMING] build_helper test:false 1.917
2019-12-12T09:08:36.4960798Z [RUSTC-TIMING] build_script_build test:false 3.097
2019-12-12T09:08:36.4960901Z    Compiling rustc_llvm v0.0.0 (D:\a\1\s\src\librustc_llvm)
2019-12-12T09:08:36.4960998Z [RUSTC-TIMING] rustc_llvm test:false 0.383
2019-12-12T09:08:51.5133382Z error: linking with `gcc` failed: exit code: 1
2019-12-12T09:08:51.5133714Z   |
2019-12-12T09:08:51.5141622Z   = note: "gcc" "-fno-use-linker-plugin" "-Wl,--nxcompat" "-nostdlib" "-m64" "D:\\a\\1\\s\\build\\x86_64-pc-windows-gnu\\stage1\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\crt2.o" "D:\\a\\1\\s\\build\\x86_64-pc-windows-gnu\\stage1\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsbegin.o" "-L" "D:\\a\\1\\s\\build\\x86_64-pc-windows-gnu\\stage1\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "D:\\a\\1\\s\\build\\x86_64-pc-windows-gnu\\stage1-rustc\\x86_64-pc-windows-gnu\\release\\deps\\rustc_llvm-a1cd685f10af29aa.rustc_llvm.cq2stdb6-cgu.0.rcgu.o" "D:\\a\\1\\s\\build\\x86_64-pc-windows-gnu\\stage1-rustc\\x86_64-pc-windows-gnu\\release\\deps\\rustc_llvm-a1cd685f10af29aa.rustc_llvm.cq2stdb6-cgu.1.rcgu.o" "-o" "D:\\a\\1\\s\\build\\x86_64-pc-windows-gnu\\stage1-rustc\\x86_64-pc-windows-gnu\\release\\deps\\rustc_llvm-a1cd685f10af29aa.exe" "-Wl,--gc-sections" "-nodefaultlibs" "-L" "D:\\a\\1\\s\\build\\x86_64-pc-windows-gnu\\stage1-rustc\\x86_64-pc-windows-gnu\\release\\deps" "-L" "D:\\a\\1\\s\\build\\x86_64-pc-windows-gnu\\stage1-rustc\\release\\deps" "-L" "D:\\a\\1\\s\\build\\x86_64-pc-windows-gnu\\stage1-rustc\\x86_64-pc-windows-gnu\\release\\build\\rustc_llvm-b242f11e03efd541\\out" "-L" "D:/a/1/s/build/x86_64-pc-windows-gnu/llvm/build/lib" "-L" "D:\\a\\1\\s\\build\\x86_64-pc-windows-gnu\\stage1\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-Wl,-Bstatic" "-Wl,--whole-archive" "-lrustllvm" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMX86Disassembler" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMX86AsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMX86CodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMX86Desc" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMX86Utils" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMX86Info" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMWebAssemblyDisassembler" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMWebAssemblyCodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMWebAssemblyDesc" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMWebAssemblyAsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMWebAssemblyInfo" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMSystemZDisassembler" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMSystemZCodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMSystemZAsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMSystemZDesc" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMSystemZInfo" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMSparcDisassembler" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMSparcCodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMSparcAsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMSparcDesc" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMSparcInfo" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMRISCVDisassembler" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMRISCVCodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMRISCVAsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMRISCVDesc" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMRISCVUtils" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMRISCVInfo" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMPowerPCDisassembler" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMPowerPCCodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMPowerPCAsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMPowerPCDesc" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMPowerPCInfo" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMNVPTXCodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMNVPTXDesc" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMNVPTXInfo" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMMSP430Disassembler" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMMSP430CodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMMSP430AsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMMSP430Desc" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMMSP430Info" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMMipsDisassembler" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMMipsCodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMMipsAsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMMipsDesc" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMMipsInfo" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMLTO" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMPasses" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMObjCARCOpts" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMHexagonDisassembler" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMHexagonCodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMipo" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMInstrumentation" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMVectorize" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMLinker" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMIRReader" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMHexagonAsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMHexagonDesc" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMHexagonInfo" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMAsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMARMDisassembler" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMARMCodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMARMAsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMARMDesc" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMARMUtils" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMARMInfo" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMAArch64Disassembler" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMMCDisassembler" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMAArch64CodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMGlobalISel" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMSelectionDAG" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMAsmPrinter" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMDebugInfoDWARF" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMCodeGen" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMTarget" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMScalarOpts" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMInstCombine" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMAggressiveInstCombine" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMTransformUtils" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMBitWriter" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMAnalysis" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMProfileData" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMObject" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMBitReader" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMBitstreamReader" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMCore" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMRemarks" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMAArch64AsmParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMMCParser" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMAArch64Desc" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMMC" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMDebugInfoCodeView" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMDebugInfoMSF" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMBinaryFormat" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMAArch64Utils" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMAArch64Info" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMSupport" "-Wl,--no-whole-archive" "-Wl,--whole-archive" "-lLLVMDemangle" "-Wl,--no-whole-archive" "-Wl,-Bdynamic" "-lpsapi" "-lshell32" "-lole32" "-ladvapi32" "-lstdc++" "-Wl,-Bstatic" "-lgcc_s" "-lpthread" "-Wl,-Bdynamic" "-luuid" "-L" "C:\\MORE_SPACE\\x86_64-pc-windows-gnu\\stage1\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-ltest-c17bc13ac7f9fb71" "-Wl,--start-group" "-L" "C:\\MORE_SPACE\\x86_64-pc-windows-gnu\\stage1\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib" "-lstd-d8e1db673d0817fb" "-Wl,--end-group" "-Wl,-Bstatic" "C:\\MORE_SPACE\\x86_64-pc-windows-gnu\\stage1\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\libcompiler_builtins-a1da1b3a2d00a5ce.rlib" "-Wl,-Bdynamic" "-lkernel32" "-ladvapi32" "-lws2_32" "-luserenv" "-lmingwex" "-lmingw32" "-lgcc" "-lmsvcrt" "-lmsvcrt" "-luser32" "-lkernel32" "D:\\a\\1\\s\\build\\x86_64-pc-windows-gnu\\stage1\\lib\\rustlib\\x86_64-pc-windows-gnu\\lib\\rsend.o"
2019-12-12T09:08:51.5148200Z   = note: D:\a\1\s\build\x86_64-pc-windows-gnu\stage1-rustc\x86_64-pc-windows-gnu\release\build\rustc_llvm-b242f11e03efd541\out\librustllvm.a(RustWrapper.o):RustWrapper.cpp:(.text$_ZN20RawRustStringOstream10write_implEPKcy[_ZN20RawRustStringOstream10write_implEPKcy]+0x11): undefined reference to `LLVMRustStringWriteImpl'
2019-12-12T09:08:51.5148739Z 
2019-12-12T09:08:51.5148836Z           collect2.exe: error: ld returned 1 exit status
2019-12-12T09:08:51.5148988Z           
2019-12-12T09:08:51.5149031Z 
2019-12-12T09:08:51.5149164Z error: aborting due to previous error
2019-12-12T09:08:51.5149230Z 
2019-12-12T09:08:51.5149230Z 
2019-12-12T09:08:51.5219107Z [RUSTC-TIMING] rustc_llvm test:true 12.908
2019-12-12T09:08:51.5330138Z error: could not compile `rustc_llvm`.
2019-12-12T09:08:51.5336384Z 
2019-12-12T09:08:51.5337377Z To learn more, run the command again with --verbose.
2019-12-12T09:08:51.5378075Z 
2019-12-12T09:08:51.5378669Z 
2019-12-12T09:08:51.5379035Z command did not execute successfully: "D:\\a\\1\\s\\build\\x86_64-pc-windows-gnu\\stage0\\bin\\cargo.exe" "test" "-Zconfig-profile" "--target" "x86_64-pc-windows-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--locked" "--color" "always" "--features" " llvm" "--manifest-path" "D:\\a\\1\\s\\src/rustc/Cargo.toml" "-p" "rustc_llvm" "--"
2019-12-12T09:08:51.5379344Z 
2019-12-12T09:08:51.5379378Z 
2019-12-12T09:08:51.6170348Z failed to run: D:\a\1\s\build\bootstrap\debug\bootstrap test --exclude src/test/ui --exclude src/test/compile-fail
2019-12-12T09:08:51.6170678Z Build completed unsuccessfully in 1:48:26
2019-12-12T09:08:51.6170678Z Build completed unsuccessfully in 1:48:26
2019-12-12T09:08:51.6559100Z make: *** [Makefile:89: ci-mingw-subset-1] Error 1
2019-12-12T09:08:51.7320938Z   local time: Thu Dec 12 09:08:51 CUT 2019
2019-12-12T09:08:52.3996541Z   network time: Thu, 12 Dec 2019 09:08:52 GMT
2019-12-12T09:08:52.4000330Z == end clock drift check ==
2019-12-12T09:08:52.4965567Z 
2019-12-12T09:08:52.4965567Z 
2019-12-12T09:08:52.8427071Z ##[error]Bash exited with code '2'.
2019-12-12T09:08:52.9018348Z ##[section]Starting: Checkout
2019-12-12T09:08:52.9871942Z ==============================================================================
2019-12-12T09:08:52.9872062Z Task         : Get sources
2019-12-12T09:08:52.9872145Z Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.

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 @TimNN. (Feature Requests)

@bors
Copy link
Contributor

bors commented Dec 12, 2019

💔 Test failed - checks-azure

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Dec 12, 2019
rustllvm relies on the `LLVMRustStringWriteImpl` symbol existing, but
this symbol was previously defined in a *downstream* crate
(rustc_codegen_llvm, which depends on rustc_llvm.

While this somehow worked under the old 'separate bootstrap step for
codegen' scheme, it meant that rustc_llvm could not actually be built by
itself, since it relied linking to the downstream rustc_codegen_llvm
crate.

Now that librustc_codegen_llvm is just a normal crate, we actually try
to build a standalone rustc_llvm when we run tests. This commit moves
`LLVMRustStringWriteImpl` into rustc_llvm (technically the rustllvm
directory, which has its contents built by rustc_llvm). This ensures
that we can build each crate in the graph by itself, without requiring
that any downstream crates be linked in as well.
@Aaron1011
Copy link
Member Author

@alexcrichton: The new build configuration seems to have exposed a weird implicit dependency of rustllvm on rustc_codegen_llvm. I've pushed a commit that should fix the issue.

@alexcrichton
Copy link
Member

@bors: r+

Nice catch!

@bors
Copy link
Contributor

bors commented Dec 12, 2019

📌 Commit 47e932b has been approved by alexcrichton

@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 Dec 12, 2019
@bors
Copy link
Contributor

bors commented Dec 13, 2019

⌛ Testing commit 47e932b with merge 3964a55...

bors added a commit that referenced this pull request Dec 13, 2019
rustc: Link LLVM directly into rustc again (take two)

This is a continuation of PR #65703
@bors
Copy link
Contributor

bors commented Dec 13, 2019

☀️ Test successful - checks-azure
Approved by: alexcrichton
Pushing 3964a55 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 13, 2019
@bors bors merged commit 47e932b into rust-lang:master Dec 13, 2019
// not for MSVC or macOS
if builder.config.llvm_static_stdcpp &&
!target.contains("freebsd") &&
!target.contains("windows") &&
Copy link
Contributor

Choose a reason for hiding this comment

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

This line changed msvc to windows breaking windows-gnu target.

Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jan 2, 2020
Previously, we relied fully on Cargo to detect that the compiler had changed and
it needed to rebuild the standard library (or later "components"). This used to
not quite be the case prior to moving to LLVM be a separate cargo invocation;
subsequent compiles would recompile std and friends if LLVM had changed
(rust-lang#67077 is the PR that changes things here).

This PR moves us to clearing out libstd when it is being compiled if the rustc
we're using has changed. We fairly harshly limit the cases in which we do this
(e.g., ignoring dry run mode, and so forth, as well as rustdoc invocations).
This is primarily because when we're not using the compiler directly, so
clearing out in other cases is likely to lead to bugs, particularly as our
deletion scheme is pretty blunt today (basically removing more than is needed,
i.e., not just the rustc artifacts).

In practice, this targeted fix does fix the known bug, though it may not fully
resolve the problem here. It's also not clear that there is a full fix hiding
here that doesn't involve a more major change (like -Zbinary-dep-depinfo was).

As a drive-by fix, don't delete the compiler before calling Build::copy, as that
also deletes the compiler.
bors added a commit that referenced this pull request Jan 8, 2020
Clear out target directory if compiler has changed

Previously, we relied fully on Cargo to detect that the compiler had changed and
it needed to rebuild the standard library (or later "components"). This used to
not quite be the case prior to moving to LLVM be a separate cargo invocation;
subsequent compiles would recompile std and friends if LLVM had changed
(#67077 is the PR that changes things here).

This PR moves us to clearing out libstd when it is being compiled if the rustc
we're using has changed. We fairly harshly limit the cases in which we do this
(e.g., ignoring dry run mode, and so forth, as well as rustdoc invocations).
This is primarily because when we're not using the compiler directly, so
clearing out in other cases is likely to lead to bugs, particularly as our
deletion scheme is pretty blunt today (basically removing more than is needed,
i.e., not just the rustc artifacts).

In practice, this targeted fix does fix the known bug, though it may not fully
resolve the problem here. It's also not clear that there is a full fix hiding
here that doesn't involve a more major change (like -Zbinary-dep-depinfo was).

As a drive-by fix, don't delete the compiler before calling Build::copy, as that
also deletes the compiler.
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. 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.

None yet

9 participants