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

Rollup of 8 pull requests #50775

Closed
wants to merge 24 commits into from
Closed

Rollup of 8 pull requests #50775

wants to merge 24 commits into from

Conversation

kennytm
Copy link
Member

@kennytm kennytm commented May 15, 2018

Successful merges:

Failed merges:

gnzlbg and others added 24 commits May 8, 2018 09:43
Previously, every `open64` was accompanied by a `ioctl(…, FIOCLEX)`,
because some old Linux version would ignore the `O_CLOEXEC` flag we pass
to the `open64` function.

Now, we check whether the `CLOEXEC` flag is set on the first file we
open – if it is, we won't do extra syscalls for every opened file. If it
is not set, we fall back to the old behavior of unconditionally calling
`ioctl(…, FIOCLEX)` on newly opened files.

On old Linuxes, this amounts to one extra syscall per process, namely
the `fcntl(…, F_GETFD)` call to check the `CLOEXEC` flag.

On new Linuxes, this reduces the number of syscalls per opened file by
one, except for the first file, where it does the same number of
syscalls as before (`fcntl(…, F_GETFD)` to check the flag instead of
`ioctl(…, FIOCLEX)` to set it).
It was introduced in rust-lang#50240 to avoid an allocation when creating a new
BTreeMap, which gave some speed-ups. But then rust-lang#50352 made that the
default behaviour for BTreeMap, so LazyBTreeMap is no longer necessary.
Unblocking PRs:
- rust-lang/cargo#5535 - Ignore <tab> in libtest output. (unblocks rust-lang#50387)
- rust-lang/cargo#5537 - Remove -Zno-trans test. (unblocks rust-lang#50615)
- rust-lang/cargo#5540 - Fix tests when CARGO_TARGET_DIR is set. (unblocks self)

Regression fixes:
- rust-lang/cargo#5503 - cargo rustc broken for tests in project with bins
- rust-lang/cargo#5520 - (rust-lang#50640) shared proc-macro dependency built incorrectly

Changes:
- rust-lang/cargo#5527 - Point Source Replacement to the Overriding Dependencies section
- rust-lang/cargo#5533 - Detail how to run locally-built nightly cargo
- rust-lang/cargo#5522 - Add option to set user-agent
- rust-lang/cargo#5519 - NFC: fix a couple of typos, found by codespell.
- rust-lang/cargo#5513 - Fix `panic` for binaries built during tests.
- rust-lang/cargo#5512 - simplify build_requirements
- rust-lang/cargo#5301 - Add --build-plan for 'cargo build'
- rust-lang/cargo#5460 - Be more conservative about which files are linked to the output dir.
- rust-lang/cargo#5509 - Use the new stable
- rust-lang/cargo#5507 - Does not print seconds fraction with minutes
- rust-lang/cargo#5498 - Bump to 0.29.0
- rust-lang/cargo#5497 - Mention +nightly in ARCHITECTURE.md
Add simd math intrinsics and gather/scatter

This PR adds simd math intrinsics for floating-point vectors (sqrt, sin, cos, pow, exp, log, fma, abs, etc.) and the generic simd gather/scatter intrinsics.
…uillaumeGomez

rustdoc: replace most (e)println! statements with structured warnings/errors

Turns out, the rustc diagnostic handler doesn't need a whole lot of setup that we weren't already doing. For errors that occur outside a "dealing with source code" context, we can just use the format/color config we were already parsing and make up a `Handler` that we can emit structured warnings/errors from. So i did that. This will make it way easier to test things with `rustdoc-ui` tests, since those require the JSON error output. (In fact, this PR is a yak shave for a different one where i was trying to do just that. `>_>`)
Don't unconditionally set CLOEXEC twice on every fd we open on Linux

Previously, every `open64` was accompanied by a `ioctl(…, FIOCLEX)`,
because some old Linux version would ignore the `O_CLOEXEC` flag we pass
to the `open64` function.

Now, we check whether the `CLOEXEC` flag is set on the first file we
open – if it is, we won't do extra syscalls for every opened file. If it
is not set, we fall back to the old behavior of unconditionally calling
`ioctl(…, FIOCLEX)` on newly opened files.

On old Linuxes, this amounts to one extra syscall per process, namely
the `fcntl(…, F_GETFD)` call to check the `CLOEXEC` flag.

On new Linuxes, this reduces the number of syscalls per opened file by
one, except for the first file, where it does the same number of
syscalls as before (`fcntl(…, F_GETFD)` to check the flag instead of
`ioctl(…, FIOCLEX)` to set it).
Update Cargo

Unblocking PRs:
- rust-lang/cargo#5535 - Ignore <tab> in libtest output. (unblocks rust-lang#50387)
- rust-lang/cargo#5537 - Remove -Zno-trans test. (unblocks rust-lang#50615)
- rust-lang/cargo#5540 - Fix tests when CARGO_TARGET_DIR is set. (unblocks self)

Regression fixes:
- rust-lang/cargo#5503 - cargo rustc broken for tests in project with bins
- rust-lang/cargo#5520 - (rust-lang#50640) shared proc-macro dependency built incorrectly

Changes:
- rust-lang/cargo#5527 - Point Source Replacement to the Overriding Dependencies section
- rust-lang/cargo#5533 - Detail how to run locally-built nightly cargo
- rust-lang/cargo#5522 - Add option to set user-agent
- rust-lang/cargo#5519 - NFC: fix a couple of typos, found by codespell.
- rust-lang/cargo#5513 - Fix `panic` for binaries built during tests.
- rust-lang/cargo#5512 - simplify build_requirements
- rust-lang/cargo#5301 - Add --build-plan for 'cargo build'
- rust-lang/cargo#5460 - Be more conservative about which files are linked to the output dir.
- rust-lang/cargo#5509 - Use the new stable
- rust-lang/cargo#5507 - Does not print seconds fraction with minutes
- rust-lang/cargo#5498 - Bump to 0.29.0
- rust-lang/cargo#5497 - Mention +nightly in ARCHITECTURE.md
read2: Use inner function instead of closure

Very minor thing, but there doesn't appear to be a reason to use a closure here.

Generated code is identical in my tests, but I believe it's clearer that nothing from the environment is being used.
…ertj

Remove LazyBTreeMap.

It was introduced in rust-lang#50240 to avoid an allocation when creating a new
BTreeMap, which gave some speed-ups. But then rust-lang#50352 made that the
default behaviour for BTreeMap, so LazyBTreeMap is no longer necessary.
…ibsyntax-ext, r=frewsxcv

Add missing error codes in libsyntax-ext asm
Don't inject clippy into the rls anymore

r? @kennytm

sorry about breaking nightlies.

The issue is that the `[patch.crates-io]` doesn't work if the versions differ. So every time we update clippy, we can only update it to the verison that rls is depending on.

I'm disabling the injection of clippy into rls for now. I'm not sure how to do this properly. We could

* add a version check, so rls only builds clippy if its dependency clippy is the same as the submodule clippy
* do something crazy like auto-patching the Cargo.toml of the rls tool repo to just use a path dependency on clippy
* build crates-io clippy instead of submodule clippy and gate clippy injection on that
    * that's somewhat automatic, and is essentially what is necessary right now, but done manually
* make clippy 0.1.* instead of 0.0.* and update patch versions for nightly updates and minor version updates for `clippy_lints` api changes.
    * not sure how semver-great this is
@rust-highfive
Copy link
Collaborator

r? @petrochenkov

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

@rust-highfive
Copy link
Collaborator

warning Warning warning

  • These commits modify submodules.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 15, 2018
@kennytm
Copy link
Member Author

kennytm commented May 15, 2018

@bors r+ p=8

@bors
Copy link
Contributor

bors commented May 15, 2018

📌 Commit e74f5e8 has been approved by kennytm

@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 May 15, 2018
@bors
Copy link
Contributor

bors commented May 15, 2018

⌛ Testing commit e74f5e8 with merge f451a432daf373c526fe3ee2d1ba6a5a99894415...

@bors
Copy link
Contributor

bors commented May 15, 2018

💔 Test failed - status-travis

@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 May 15, 2018
@rust-highfive
Copy link
Collaborator

The job arm-android of your PR failed on Travis (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.
[01:29:38] ---- [run-pass] run-pass/simd-intrinsic-float-math.rs stdout ----
[01:29:38]  
[01:29:38] error: compilation failed!
[01:29:38] status: exit code: 101
[01:29:38] command: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/src/test/run-pass/simd-intrinsic-float-math.rs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass" "--target=arm-linux-androideabi" "-C" "prefer-dynamic" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/simd-intrinsic-float-math.stage2-arm-linux-androideabi" "-Crpath" "-O" "-Zunstable-options" "-Lnative=/checkout/obj/build/arm-linux-androideabi/native/rust-test-helpers" "-Clinker=/android/ndk/arm-14/bin/arm-linux-androideabi-clang" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/simd-intrinsic-float-math.stage2-arm-linux-androideabi.aux"
[01:29:38] ------------------------------------------
[01:29:38] 
[01:29:38] ------------------------------------------
[01:29:38] stderr:
[01:29:38] stderr:
[01:29:38] ------------------------------------------
[01:29:38] error: linking with `/android/ndk/arm-14/bin/arm-linux-androideabi-clang` failed: exit code: 1
[01:29:38]   |
[01:29:38]   = note: "/android/ndk/arm-14/bin/arm-linux-androideabi-clang" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-Wl,--allow-multiple-definition" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/arm-linux-androideabi/lib" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/simd-intrinsic-float-math.simd_intrinsic_float_math0-317d481089b8c8fe83113de504472633.rs.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/simd-intrinsic-float-math.simd_intrinsic_float_math1-317d481089b8c8fe83113de504472633.rs.rcgu.o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/simd-intrinsic-float-math.simd_intrinsic_float_math2-317d481089b8c8fe83113de504472633.rs.rcgu.o" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/simd-intrinsic-float-math.stage2-arm-linux-androideabi" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/simd-intrinsic-float-math.crate.allocator.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass" "-L" "/checkout/obj/build/arm-linux-androideabi/native/rust-test-helpers" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/simd-intrinsic-float-math.stage2-arm-linux-androideabi.aux" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/arm-linux-androideabi/lib" "-Wl,--start-group" "-L" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/arm-linux-androideabi/lib" "-l" "std-dd7e1cb952f01bfe" "-Wl,--end-group" "-Wl,-Bstatic" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/lib/rustlib/arm-linux-androideabi/lib/libcompiler_builtins-93fbfd71748200b0.rlib" "-Wl,-Bdynamic" "-l" "dl" "-l" "log" "-l" "gcc" "-l" "gcc" "-l" "c" "-l" "m" "-Wl,-rpath,$ORIGIN/../../stage2/lib/rustlib/arm-linux-androideabi/lib" "-Wl,-rpath,/checkout/obj/lib/rustlib/arm-linux-androideabi/lib" "-Wl,--enable-new-dtags"
[01:29:38]   = note: /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/simd-intrinsic-float-math.simd_intrinsic_float_math1-317d481089b8c8fe83113de504472633.rs.rcgu.o:simd_intrinsic_float_math1-317d481089b8c8fe83113de504472633.rs:function simd_intrinsic_float_math::main::h3154db08c8edf39b: error: undefined reference to 'log2f'
[01:29:38]           /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/simd-intrinsic-float-math.simd_intrinsic_float_math1-317d481089b8c8fe83113de504472633.rs.rcgu.o:simd_intrinsic_float_math1-317d481089b8c8fe83113de504472633.rs:function simd_intrinsic_float_math::main::h3154db08c8edf39b: error: undefined reference to 'log2f'
[01:29:38]           /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/simd-intrinsic-float-math.simd_intrinsic_float_math1-317d481089b8c8fe83113de504472633.rs.rcgu.o:simd_intrinsic_float_math1-317d481089b8c8fe83113de504472633.rs:function simd_intrinsic_float_math::main::h3154db08c8edf39b: error: undefined reference to 'log2f'
[01:29:38]           /checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass/simd-intrinsic-float-math.simd_intrinsic_float_math1-317d481089b8c8fe83113de504472633.rs.rcgu.o:simd_intrinsic_float_math1-317d481089b8c8fe83113de504472633.rs:function simd_intrinsic_float_math::main::h3154db08c8edf39b: error: undefined reference to 'log2f'
[01:29:38]           clang50: error: linker command failed with exit code 1 (use -v to see invocation)
[01:29:38] 
[01:29:38] error: aborting due to previous error
[01:29:38] 
[01:29:38] 
---
[01:29:38] test result: FAILED. 2961 passed; 1 failed; 25 ignored; 0 measured; 0 filtered out
[01:29:38] 
[01:29:39] 
[01:29:39] 
[01:29:39] 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/arm-linux-androideabi/lib" "--rustc-path" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage2/bin/rustc" "--src-base" "/checkout/src/test/run-pass" "--build-base" "/checkout/obj/build/x86_64-unknown-linux-gnu/test/run-pass" "--stage-id" "stage2-arm-linux-androideabi" "--mode" "run-pass" "--target" "arm-linux-androideabi" "--host" "x86_64-unknown-linux-gnu" "--llvm-filecheck" "/checkout/obj/build/x86_64-unknown-linux-gnu/llvm/build/bin/FileCheck" "--linker" "/android/ndk/arm-14/bin/arm-linux-androideabi-clang" "--host-rustcflags" "-Crpath -O -Zunstable-options " "--target-rustcflags" "-Crpath -O -Zunstable-options  -Lnative=/checkout/obj/build/arm-linux-androideabi/native/rust-test-helpers" "--docck-python" "/usr/bin/python2.7" "--lldb-python" "/usr/bin/python2.7" "--llvm-version" "6.0.1\n" "--cc" "" "--cxx" "" "--cflags" "" "--llvm-components" "" "--llvm-cxxflags" "" "--remote-test-client" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-tools-bin/remote-test-client" "--adb-path" "adb" "--adb-test-dir" "/data/tmp/work" "--android-cross-path" "/android/ndk/arm-14" "--color" "always"
[01:29:39] 
[01:29:39] 
[01:29:39] failed to run: /checkout/obj/build/bootstrap/debug/bootstrap test --target arm-linux-androideabi
[01:29:39] Build completed unsuccessfully in 1:15:28

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)

@kennytm kennytm closed this May 15, 2018
@Centril Centril added the rollup A PR which is a rollup label Oct 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rollup A PR which is a rollup S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.