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

remove the unstable rustdoc parameter --linker #63834

Merged
merged 1 commit into from
Sep 2, 2019

Conversation

andjo403
Copy link
Contributor

use the code generation parameter -Clinker (same parameter as rustc)
to control what linker to use for building the rustdoc test executables.

closes: #63816

@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed (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-08-23T20:48:10.0676191Z ##[command]git remote add origin https://github.com/rust-lang/rust
2019-08-23T20:48:10.0888411Z ##[command]git config gc.auto 0
2019-08-23T20:48:10.0965879Z ##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
2019-08-23T20:48:10.1026181Z ##[command]git config --get-all http.proxy
2019-08-23T20:48:10.1175758Z ##[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/63834/merge:refs/remotes/pull/63834/merge
---
2019-08-23T20:48:45.3003285Z do so (now or later) by using -b with the checkout command again. Example:
2019-08-23T20:48:45.3003318Z 
2019-08-23T20:48:45.3003565Z   git checkout -b <new-branch-name>
2019-08-23T20:48:45.3003598Z 
2019-08-23T20:48:45.3003651Z HEAD is now at 0acedf7d7 Merge 22893938381a65b15f645386b0b8ea0d669b26c5 into 9eae1fc0ea9b00341b8fe191582c4decb5cb86a3
2019-08-23T20:48:45.3193557Z ##[section]Starting: Collect CPU-usage statistics in the background
2019-08-23T20:48:45.3197066Z ==============================================================================
2019-08-23T20:48:45.3197150Z Task         : Bash
2019-08-23T20:48:45.3197201Z Description  : Run a Bash script on macOS, Linux, or Windows
---
2019-08-23T20:52:57.5756527Z    Compiling serde_derive v1.0.81
2019-08-23T20:53:15.8834018Z    Compiling serde_json v1.0.40
2019-08-23T20:53:16.2665272Z    Compiling toml v0.5.3
2019-08-23T20:53:19.4579216Z    Compiling bootstrap v0.0.0 (/checkout/src/bootstrap)
2019-08-23T20:53:21.1862723Z error[E0277]: `std::path::Path` doesn't implement `std::fmt::Display`
2019-08-23T20:53:21.1903345Z     --> src/bootstrap/test.rs:1138:44
2019-08-23T20:53:21.1903428Z      |
2019-08-23T20:53:21.1903710Z 1138 |             cmd.arg(format!("-Clinker={}", linker));
2019-08-23T20:53:21.1909509Z      |                                            ^^^^^^ `std::path::Path` cannot be formatted with the default formatter; call `.display()` on it
2019-08-23T20:53:21.1909819Z      |
2019-08-23T20:53:21.1909976Z      = help: the trait `std::fmt::Display` is not implemented for `std::path::Path`
2019-08-23T20:53:21.1910496Z      = note: call `.display()` or `.to_string_lossy()` to safely print paths, as they may contain non-Unicode data
2019-08-23T20:53:21.1910715Z      = note: required because of the requirements on the impl of `std::fmt::Display` for `&std::path::Path`
2019-08-23T20:53:21.1910871Z      = note: required by `std::fmt::Display::fmt`
2019-08-23T20:53:22.6836097Z error: aborting due to previous error
2019-08-23T20:53:22.6836212Z 
2019-08-23T20:53:22.6837156Z For more information about this error, try `rustc --explain E0277`.
2019-08-23T20:53:22.7501747Z error: Could not compile `bootstrap`.
2019-08-23T20:53:22.7501747Z error: Could not compile `bootstrap`.
2019-08-23T20:53:22.7501844Z 
2019-08-23T20:53:22.7503156Z To learn more, run the command again with --verbose.
2019-08-23T20:53:22.7547042Z failed to run: /checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path /checkout/src/bootstrap/Cargo.toml
2019-08-23T20:53:22.7599226Z == clock drift check ==
2019-08-23T20:53:22.7611091Z   local time: Fri Aug 23 20:53:22 UTC 2019
2019-08-23T20:53:22.8333311Z   network time: Fri, 23 Aug 2019 20:53:22 GMT
2019-08-23T20:53:22.8337659Z == end clock drift check ==
2019-08-23T20:53:22.8337659Z == end clock drift check ==
2019-08-23T20:53:26.1826231Z ##[error]Bash exited with code '1'.
2019-08-23T20:53:26.1860496Z ##[section]Starting: Checkout
2019-08-23T20:53:26.1862342Z ==============================================================================
2019-08-23T20:53:26.1862403Z Task         : Get sources
2019-08-23T20:53:26.1862460Z 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)

@JohnTitor JohnTitor added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 25, 2019
@bors
Copy link
Contributor

bors commented Aug 30, 2019

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

@andjo403
Copy link
Contributor Author

ping @steveklabnik
do not know if steves status is correct that he is on vacation
cc @rust-lang/rustdoc

cmd.arg("--linker").arg(linker).arg("-Z").arg("unstable-options");
let mut arg = OsString::from("-Clinker=");
arg.push(&linker);
cmd.arg(arg);
Copy link
Member

Choose a reason for hiding this comment

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

The better way to do this is just .arg("-Clinker").arg(&linker)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tired to do like that but did not get it to work
when I test with rustc -Clinker /usr/bin/cc I get an error
error: codegen option linker requires a path (C linker=<value>)

Copy link
Member

Choose a reason for hiding this comment

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

Hm, that seems buggy. Oh well, let's leave it like this then.

@@ -1124,7 +1124,7 @@ impl Step for Compiletest {
flags.push(builder.config.cmd.rustc_args().join(" "));

if let Some(linker) = builder.linker(target) {
cmd.arg("--linker").arg(linker);
cmd.arg(format!("-Clinker={}", linker.display()));
Copy link
Member

Choose a reason for hiding this comment

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

Same as before, we want to avoid display() if at all possible as it's lossy, we can pass two args here just fine

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ought not have updated this file at all as it is not calling rustdoc
resulting in failed test

.arg(linker)
.arg("-Z")
.arg("unstable-options");
rustdoc.arg(format!("-Clinker={}", linker));
Copy link
Member

Choose a reason for hiding this comment

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

Same two arg situation here too

@Mark-Simulacrum Mark-Simulacrum added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Aug 31, 2019
@Mark-Simulacrum
Copy link
Member

r? @Mark-Simulacrum

@rust-lang/rustdoc We're going to remove --linker in this PR in favor of -Clinker which is stable in the compiler already. If you have any objections, please raise them, but I'm hoping to approve this PR in a week or so if no objections are raised.

@andjo403
Copy link
Contributor Author

gott a comment about that the removal shall be ok in #63816 (comment)

@steveklabnik
Copy link
Member

steveklabnik commented Aug 31, 2019 via email

@ollie27
Copy link
Member

ollie27 commented Aug 31, 2019

Looks good to me, especially now that it was broken by #63827.

@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Aug 31, 2019

📌 Commit d097dda34e578728ac7f8afad99fa092adafcdc7 has been approved by Mark-Simulacrum

@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 Aug 31, 2019
@bors
Copy link
Contributor

bors commented Sep 1, 2019

⌛ Testing commit d097dda34e578728ac7f8afad99fa092adafcdc7 with merge 0e72d803ab2015db9139191d1a7a109acf9c7b93...

@rust-highfive
Copy link
Collaborator

The job dist-i586-gnu-i586-i686-musl of your PR failed (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-09-01T00:06:22.2228804Z Looks like docker image is the same as before, not uploading
2019-09-01T00:06:28.7893580Z [CI_JOB_NAME=dist-i586-gnu-i586-i686-musl]
2019-09-01T00:06:28.9960710Z [CI_JOB_NAME=dist-i586-gnu-i586-i686-musl]
2019-09-01T00:06:28.9994177Z == clock drift check ==
2019-09-01T00:06:29.0005087Z   local time: Sun Sep  1 00:06:29 UTC 2019
2019-09-01T00:06:29.0228621Z   network time: Sun, 01 Sep 2019 00:06:29 GMT
2019-09-01T00:06:29.0251106Z Starting sccache server...
2019-09-01T00:06:29.1198343Z configure: processing command line
2019-09-01T00:06:29.1199706Z configure: 
2019-09-01T00:06:29.1200824Z configure: rust.dist-src        := False
---
2019-09-01T01:14:43.3091163Z [RUSTC-TIMING] compiletest test:false 17.827
2019-09-01T01:14:43.3119062Z     Finished release [optimized] target(s) in 2m 09s
2019-09-01T01:14:43.3219252Z [TIMING] ToolBuild { compiler: Compiler { stage: 0, host: "x86_64-unknown-linux-gnu" }, target: "x86_64-unknown-linux-gnu", tool: "compiletest", path: "src/tools/compiletest", mode: ToolBootstrap, is_optional_tool: false, source_type: InTree, extra_features: [] } -- 129.395
2019-09-01T01:14:43.3346755Z Check compiletest suite=ui mode=ui (x86_64-unknown-linux-gnu -> i586-unknown-linux-gnu)
2019-09-01T01:14:43.3370345Z thread 'main' panicked at 'UnrecognizedOption("C")', src/tools/compiletest/src/main.rs:262:19
2019-09-01T01:14:43.3370870Z 
2019-09-01T01:14:43.3370914Z 
2019-09-01T01:14:43.3370914Z 
2019-09-01T01:14:43.3373110Z 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/i586-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-i586-unknown-linux-gnu" "--mode" "ui" "--target" "i586-unknown-linux-gnu" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "-Clinker=cc" "--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/i586-unknown-linux-gnu/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--gdb" "/usr/bin/gdb" "--llvm-version" "9.0.0-rust-1.39.0-nightly\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "" "--color" "always"
2019-09-01T01:14:43.3374144Z 
2019-09-01T01:14:43.3374190Z 
2019-09-01T01:14:43.3381708Z failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target i586-unknown-linux-gnu,i686-unknown-linux-musl
2019-09-01T01:14:43.3381903Z Build completed unsuccessfully in 1:05:37
2019-09-01T01:14:43.3381903Z Build completed unsuccessfully in 1:05:37
2019-09-01T01:14:43.3435296Z == clock drift check ==
2019-09-01T01:14:43.3450776Z   local time: Sun Sep  1 01:14:43 UTC 2019
2019-09-01T01:14:43.5355312Z   network time: Sun, 01 Sep 2019 01:14:43 GMT
2019-09-01T01:14:43.5358375Z == end clock drift check ==
2019-09-01T01:14:44.9356275Z ##[error]Bash exited with code '1'.
2019-09-01T01:14:44.9393469Z ##[section]Starting: Upload CPU usage statistics
2019-09-01T01:14:44.9399050Z ==============================================================================
2019-09-01T01:14:44.9399211Z Task         : Bash
2019-09-01T01:14:44.9399284Z Description  : Run a Bash script on macOS, Linux, or Windows

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 Sep 1, 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 Sep 1, 2019
use the code generation parameter -Clinker (same parameter as rustc)
to control what linker to use for building the rustdoc test executables.

closes: rust-lang#63816
@andjo403
Copy link
Contributor Author

andjo403 commented Sep 1, 2019

@Mark-Simulacrum needs a new review updated an file with Compiletest by mistake

@Mark-Simulacrum
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Sep 1, 2019

📌 Commit f0b30c7 has been approved by Mark-Simulacrum

@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 Sep 1, 2019
@bors
Copy link
Contributor

bors commented Sep 2, 2019

⌛ Testing commit f0b30c7 with merge fdaf594...

bors added a commit that referenced this pull request Sep 2, 2019
remove the unstable rustdoc parameter --linker

use the code generation parameter -Clinker (same parameter as rustc)
to control what linker to use for building the rustdoc test executables.

closes: #63816
@bors
Copy link
Contributor

bors commented Sep 2, 2019

☀️ Test successful - checks-azure
Approved by: Mark-Simulacrum
Pushing fdaf594 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 2, 2019
@bors bors merged commit f0b30c7 into rust-lang:master Sep 2, 2019
@andjo403
Copy link
Contributor Author

andjo403 commented Sep 2, 2019

@Mark-Simulacrum shall this also be marked as relnotes as it adds the possibility to use the -Clinker option on stable?

@Mark-Simulacrum Mark-Simulacrum added the relnotes Marks issues that should be documented in the release notes of the next release. label Sep 2, 2019
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Nov 11, 2019
Pkgsrc changes:
 * Remove patch which no longer applies (but what about RPATH?)
 * Adapt a few patches to changed files upstream.

Upstream changes:

Version 1.39.0 (2019-11-07)
===========================

Language
--------
- [You can now create `async` functions and blocks with `async fn`,
  `async move {}`, and `async {}` respectively, and you can now call
  `.await` on async expressions.][63209]
- [You can now use certain attributes on function, closure, and function
  pointer parameters.][64010] These attributes include `cfg`, `cfg_attr`,
  `allow`, `warn`, `deny`, `forbid` as well as inert helper attributes used
  by procedural macro attributes applied to items. e.g.
  ```rust
  fn len(
      #[cfg(windows)] slice: &[u16],
      #[cfg(not(windows))] slice: &[u8],
  ) -> usize {
      slice.len()
  }
  ```
- [You can now take shared references to bind-by-move patterns in the
  `if` guards of `match` arms.][63118] e.g.
  ```rust
  fn main() {
      let array: Box<[u8; 4]> = Box::new([1, 2, 3, 4]);

      match array {
          nums
  //      ---- `nums` is bound by move.
              if nums.iter().sum::<u8>() == 10
  //                 ^------ `.iter()` implicitly takes a reference to `nums`.
          => {
              drop(nums);
  //          ----------- Legal as `nums` was bound by move and so we have ownership.
          }
          _ => unreachable!(),
      }
  }
  ```

Compiler
--------
- [Added tier 3\* support for the `i686-unknown-uefi` target.][64334]
- [Added tier 3 support for the `sparc64-unknown-openbsd` target.][63595]
- [rustc will now trim code snippets in diagnostics to fit in your terminal.]
  [63402] **Note** Cargo currently doesn't use this feature. Refer to
  [cargo#7315][cargo/7315] to track this feature's progress.
- [You can now pass `--show-output` argument to test binaries to print the
  output of successful tests.][62600]

\* Refer to Rust's [platform support page][forge-platform-support] for more
information on Rust's tiered platform support.

Libraries
---------
- [`Vec::new` and `String::new` are now `const` functions.][64028]
- [`LinkedList::new` is now a `const` function.][63684]
- [`str::len`, `[T]::len` and `str::as_bytes` are now `const` functions.][63770]
- [The `abs`, `wrapping_abs`, and `overflowing_abs` numeric functions are
  now `const`.][63786]

Stabilized APIs
---------------
- [`Pin::into_inner`]
- [`Instant::checked_duration_since`]
- [`Instant::saturating_duration_since`]

Cargo
-----
- [You can now publish git dependencies if supplied with a `version`.]
  [cargo/7237]
- [The `--all` flag has been renamed to `--workspace`.][cargo/7241] Using
  `--all` is now deprecated.

Misc
----
- [You can now pass `-Clinker` to rustdoc to control the linker used
  for compiling doctests.][63834]

Compatibility Notes
-------------------
- [Code that was previously accepted by the old borrow checker, but rejected by
  the NLL borrow checker is now a hard error in Rust 2018.][63565] This was
  previously a warning, and will also become a hard error in the Rust 2015
  edition in the 1.40.0 release.
- [`rustdoc` now requires `rustc` to be installed and in the same directory to
  run tests.][63827] This should improve performance when running a large
  amount of doctests.
- [The `try!` macro will now issue a deprecation warning.][62672] It is
  recommended to use the `?` operator instead.
- [`asinh(-0.0)` now correctly returns `-0.0`.][63698] Previously this
  returned `0.0`.

[62600]: rust-lang/rust#62600
[62672]: rust-lang/rust#62672
[63118]: rust-lang/rust#63118
[63209]: rust-lang/rust#63209
[63402]: rust-lang/rust#63402
[63565]: rust-lang/rust#63565
[63595]: rust-lang/rust#63595
[63684]: rust-lang/rust#63684
[63698]: rust-lang/rust#63698
[63770]: rust-lang/rust#63770
[63786]: rust-lang/rust#63786
[63827]: rust-lang/rust#63827
[63834]: rust-lang/rust#63834
[63927]: rust-lang/rust#63927
[63933]: rust-lang/rust#63933
[63934]: rust-lang/rust#63934
[63938]: rust-lang/rust#63938
[63940]: rust-lang/rust#63940
[63941]: rust-lang/rust#63941
[63945]: rust-lang/rust#63945
[64010]: rust-lang/rust#64010
[64028]: rust-lang/rust#64028
[64334]: rust-lang/rust#64334
[cargo/7237]: rust-lang/cargo#7237
[cargo/7241]: rust-lang/cargo#7241
[cargo/7315]: rust-lang/cargo#7315
[`Pin::into_inner`]: https://doc.rust-lang.org/std/pin/struct.Pin.html#method.into_inner
[`Instant::checked_duration_since`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_duration_since
[`Instant::saturating_duration_since`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.saturating_duration_since
@andjo403 andjo403 deleted the rustdoc-linker-remove branch February 28, 2021 09:34
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. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RustDoc: remove the redundant unstable option "--linker"
7 participants