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

Bump compiler-builtins to 0.1.15 #60981

Merged
merged 1 commit into from
May 23, 2019

Conversation

alexcrichton
Copy link
Member

This commit bumps the compiler-builtins dependency to 0.1.15 which
expects to have the source for compiler-rt provided externally if the
c feature is enabled. This then plumbs through the necessary support
in the build system to ensure that if the llvm-project directory is
checked out and present that we enable the c feature of
compiler-builtins and compile in all the C intrinsics.

@alexcrichton
Copy link
Member Author

r? @cuviper

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

(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 May 20, 2019
@cuviper
Copy link
Member

cuviper commented May 20, 2019

What is the impact of not having that c feature enabled? e.g. Can a Linux target build without it? I know that GCC as the "cc" linker will include libgcc.a, which also implements a lot of builtins...

@alexcrichton
Copy link
Member Author

The theoretical impact is that some binaries won't link if an intrinsic hasn't been ported from C to Rust (although that's pretty rare) or a binary may run a bit slower if an optimized assembly routine isn't included and instead a slower Rust routine is. Our distribution targets don't need it enabled afaik but we've never tried to build them without it afaik.

This is probably going to regress something somewhere, but nothing major that I know of in the sense that it's probably some esoteric configuration in one way or another.

@cuviper
Copy link
Member

cuviper commented May 20, 2019

OK, I just connected the dots on #[maybe_use_optimized_c_shim] too. Can you extend the comment in compile.rs to give readers a clue? We should get a builder testing this configuration too -- I suppose x86_64-gnu-llvm-6.0 is the best candidate, if we just avoid its LLVM in init_repo.sh.

@alexcrichton
Copy link
Member Author

A better comment definitely makes sense, but I don't really know of a great way to test this on CI that isn't overly invasive to our current config :(

@cuviper
Copy link
Member

cuviper commented May 20, 2019

OK, thanks. I'll think more about CI myself, but I did test it locally too.

@bors r+

@bors
Copy link
Contributor

bors commented May 20, 2019

📌 Commit 69c6326 has been approved by cuviper

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

bors commented May 21, 2019

⌛ Testing commit 69c6326 with merge 4e4e986f9dc43c199ff1971ddc5d90ecf3c18d1c...

@bors
Copy link
Contributor

bors commented May 21, 2019

💔 Test failed - checks-travis

@rust-highfive
Copy link
Collaborator

The job dist-aarch64-linux 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.
[00:03:49] --- stdout
[00:03:49] TARGET = Some("x86_64-unknown-linux-gnu")
[00:03:49] OPT_LEVEL = Some("2")
[00:03:49] HOST = Some("x86_64-unknown-linux-gnu")
[00:03:49] CC_x86_64-unknown-linux-gnu = Some("sccache cc")
[00:03:49] CFLAGS_x86_64-unknown-linux-gnu = Some("-ffunction-sections -fdata-sections -fPIC -m64")
[00:03:49] CRATE_CC_NO_DEFAULTS = None
[00:03:49] DEBUG = Some("false")
[00:03:49] CARGO_CFG_TARGET_FEATURE = Some("fxsr,mmx,sse,sse2")
[00:03:49] running: "sccache" "cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-fno-builtin" "-fvisibility=hidden" "-fomit-frame-pointer" "-ffreestanding" "-DVISIBILITY_HIDDEN" "-DCOMPILER_RT_HAS_UNAME=1" "-DCOMPILER_RT_HAS_FCNTL_LCK=1" "-DCOMPILER_RT_HAS_ATOMICS=1" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/build/profiler_builtins-98e28db5f13c3bec/out/GCDAProfiling.o" "-c" "/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/compiler_builtins-0.1.15/compiler-rt/lib/profile/GCDAProfiling.c"
[00:03:49] cargo:warning=cc: error: /cargo/registry/src/git.luolix.top-1ecc6299db9ec823/compiler_builtins-0.1.15/compiler-rt/lib/profile/GCDAProfiling.c: No such file or directory
[00:03:49] cargo:warning=cc: warning: '-x c' after last input file has no effect
[00:03:49] cargo:warning=cc: fatal error: no input files
[00:03:49] cargo:warning=compilation terminated.
[00:03:49] 
[00:03:49] --- stderr
[00:03:49] thread 'main' panicked at '
[00:03:49] 
[00:03:49] 
[00:03:49] Internal error occurred: Command "sccache" "cc" "-O2" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-fno-builtin" "-fvisibility=hidden" "-fomit-frame-pointer" "-ffreestanding" "-DVISIBILITY_HIDDEN" "-DCOMPILER_RT_HAS_UNAME=1" "-DCOMPILER_RT_HAS_FCNTL_LCK=1" "-DCOMPILER_RT_HAS_ATOMICS=1" "-o" "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0-std/x86_64-unknown-linux-gnu/release/build/profiler_builtins-98e28db5f13c3bec/out/GCDAProfiling.o" "-c" "/cargo/registry/src/git.luolix.top-1ecc6299db9ec823/compiler_builtins-0.1.15/compiler-rt/lib/profile/GCDAProfiling.c" with args "cc" did not execute successfully (status code exit code: 1).
[00:03:49] ', /cargo/registry/src/git.luolix.top-1ecc6299db9ec823/cc-1.0.35/src/lib.rs:2398:5
[00:03:49] note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
[00:03:49] 
[00:03:49] warning: build failed, waiting for other jobs to finish...
---
travis_time:end:342b0232:start=1558399180038769625,finish=1558399180044269164,duration=5499539
travis_fold:end:after_failure.3
travis_fold:start:after_failure.4
travis_time:start:14539ad5
$ ln -s . checkout && for CORE in obj/cores/core.*; do EXE=$(echo $CORE | sed 's|obj/cores/core\.[0-9]*\.!checkout!\(.*\)|\1|;y|!|/|'); if [ -f "$EXE" ]; then printf travis_fold":start:crashlog\n\033[31;1m%s\033[0m\n" "$CORE"; gdb --batch -q -c "$CORE" "$EXE" -iex 'set auto-load off' -iex 'dir src/' -iex 'set sysroot .' -ex bt -ex q; echo travis_fold":"end:crashlog; fi; done || true
travis_fold:end:after_failure.4
travis_fold:start:after_failure.5
travis_time:start:18601eee
travis_time:start:18601eee
$ cat ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers || true
cat: ./obj/build/x86_64-unknown-linux-gnu/native/asan/build/lib/asan/clang_rt.asan-dynamic-i386.vers: No such file or directory
travis_fold:end:after_failure.5
travis_fold:start:after_failure.6
travis_time:start:025cd52a
$ dmesg | grep -i kill

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 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 21, 2019
Centril added a commit to Centril/rust that referenced this pull request May 21, 2019
…ns, r=cuviper

Bump compiler-builtins to 0.1.15

This commit bumps the `compiler-builtins` dependency to 0.1.15 which
expects to have the source for `compiler-rt` provided externally if the
`c` feature is enabled. This then plumbs through the necessary support
in the build system to ensure that if the `llvm-project` directory is
checked out and present that we enable the `c` feature of
`compiler-builtins` and compile in all the C intrinsics.
@Centril
Copy link
Contributor

Centril commented May 21, 2019

@bors retry

Not fully sure if spurious or not...

@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 21, 2019
@cuviper
Copy link
Member

cuviper commented May 21, 2019

cc: error: /cargo/registry/src/git.luolix.top-1ecc6299db9ec823/compiler_builtins-0.1.15/compiler-rt/lib/profile/GCDAProfiling.c: No such file or directory

That path isn't valid -- it should be using something under src/llvm-project/ now.

@bors r-

@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label May 21, 2019
@bors
Copy link
Contributor

bors commented May 21, 2019

📌 Commit 3a132ea has been approved by cuviper

@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 May 21, 2019
Centril added a commit to Centril/rust that referenced this pull request May 22, 2019
…ns, r=cuviper

Bump compiler-builtins to 0.1.15

This commit bumps the `compiler-builtins` dependency to 0.1.15 which
expects to have the source for `compiler-rt` provided externally if the
`c` feature is enabled. This then plumbs through the necessary support
in the build system to ensure that if the `llvm-project` directory is
checked out and present that we enable the `c` feature of
`compiler-builtins` and compile in all the C intrinsics.
@Centril
Copy link
Contributor

Centril commented May 22, 2019

Failed in #61032 (comment), @bors r-

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 22, 2019
This commit bumps the `compiler-builtins` dependency to 0.1.15 which
expects to have the source for `compiler-rt` provided externally if the
`c` feature is enabled. This then plumbs through the necessary support
in the build system to ensure that if the `llvm-project` directory is
checked out and present that we enable the `c` feature of
`compiler-builtins` and compile in all the C intrinsics.
@alexcrichton
Copy link
Member Author

Looks like our old friend rust-lang/compiler-rt@d85fb9e never made its way into the llvm-project submodule (and for good reason!). I've now applied it and included it here.

@bors: r=cuviper

@bors
Copy link
Contributor

bors commented May 22, 2019

📌 Commit e59f0cc has been approved by cuviper

@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 May 22, 2019
Centril added a commit to Centril/rust that referenced this pull request May 23, 2019
…ns, r=cuviper

Bump compiler-builtins to 0.1.15

This commit bumps the `compiler-builtins` dependency to 0.1.15 which
expects to have the source for `compiler-rt` provided externally if the
`c` feature is enabled. This then plumbs through the necessary support
in the build system to ensure that if the `llvm-project` directory is
checked out and present that we enable the `c` feature of
`compiler-builtins` and compile in all the C intrinsics.
bors added a commit that referenced this pull request May 23, 2019
Rollup of 7 pull requests

Successful merges:

 - #60981 (Bump compiler-builtins to 0.1.15)
 - #61014 (Make -Zemit-artifact-notifications also emit the artifact type)
 - #61043 (Disable LLVM/debug assertions in gnu-full-bootstrap)
 - #61046 (Fix ICE with inconsistent macro matchers)
 - #61055 (Solaris CI: Build with dilos2 stable)
 - #61057 (Revert "Add implementations of last in terms of next_back on a bunch of DoubleEndedIterators.")
 - #61073 (librustc_errors: Remove unused annotation style `OldSchoolNoteText`)

Failed merges:

r? @ghost
@bors bors merged commit e59f0cc into rust-lang:master May 23, 2019
@alexcrichton alexcrichton deleted the update-compiler-builtins branch July 8, 2019 20:34
maurer added a commit to maurer/rust that referenced this pull request Sep 6, 2019
In rust-lang#60981 we switched to using src/llvm-project/compiler-rt inside
compiler-builtins rather than a separate copy of it.
In order to have the "c" feature turn on in builds from the source
tarball, we need to include that path in its creation.

fixes rust-lang#64239
Centril added a commit to Centril/rust that referenced this pull request Sep 7, 2019
…richton

Include compiler-rt in the source tarball

In rust-lang#60981 we switched to using src/llvm-project/compiler-rt inside
compiler-builtins rather than a separate copy of it.
In order to have the "c" feature turn on in builds from the source
tarball, we need to include that path in its creation.

fixes rust-lang#64239
cuviper pushed a commit to cuviper/rust that referenced this pull request Sep 13, 2019
In rust-lang#60981 we switched to using src/llvm-project/compiler-rt inside
compiler-builtins rather than a separate copy of it.
In order to have the "c" feature turn on in builds from the source
tarball, we need to include that path in its creation.

fixes rust-lang#64239
gburgessiv added a commit to gburgessiv/rust that referenced this pull request Oct 11, 2020
The assignment of `features` above was added in rust-lang#60981, but
never used. Presumably the intent was to replace the string literal here
with it.

While I'm in the area, `compiler_builtins_c_feature` doesn't need to be
a `String`.
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Oct 13, 2020
…lexcrichton

bootstrap: only use compiler-builtins-c if they exist

The assignment of `features` above was added in rust-lang#60981, but
never used. Presumably the intent was to replace the string literal here
with it.

While I'm in the area, `compiler_builtins_c_feature` doesn't need to be
a `String`.

I'm not entirely sure of a great way to locally test this -- `./x.py test`
passed on my machine, but 🤷‍♂️.

r? @alexcrichton
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Oct 14, 2020
…lexcrichton

bootstrap: only use compiler-builtins-c if they exist

The assignment of `features` above was added in rust-lang#60981, but
never used. Presumably the intent was to replace the string literal here
with it.

While I'm in the area, `compiler_builtins_c_feature` doesn't need to be
a `String`.

I'm not entirely sure of a great way to locally test this -- `./x.py test`
passed on my machine, but 🤷‍♂️.

r? @alexcrichton
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants