Skip to content

README: Add compiler-rt cloning step #127

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

Merged
merged 1 commit into from
Feb 19, 2022

Conversation

jbruechert
Copy link
Contributor

I hope this is correct, at least it makes it build again for me.

Readme.md Outdated
@@ -21,6 +21,8 @@ You can also use my [fork of gcc](https://github.com/antoyo/gcc) which already i
```bash
$ git clone https://github.com/rust-lang/rustc_codegen_gcc.git
$ cd rustc_codegen_gcc
$ git clone https://github.com/llvm/llvm-project llvm --depth 1 --single-branch $
$ export RUST_COMPILER_RT_ROOT="$PWD/llvm/compiler-rt" $
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't be needed. compiler-builtins which is built as part of the rust standard library should already provide all necessary intrinsics. What error do you get without?

Copy link
Member

Choose a reason for hiding this comment

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

Looks like compiler-builtins itself reads this env var if the "c" package feature is enabled, which it shouldn:t at least on x86. What arch do you use?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm on x86_64. The error I'm getting is

error: failed to run custom build command for `compiler_builtins v0.1.67`

Caused by:
  process didn't exit successfully: `/home/jonahb/dev/rust/rustc_codegen_gcc/build_sysroot/target/debug/build/compiler_builtins-8535d9b204370609/build-script-build` (exit status: 101)
  --- stdout
  cargo:rerun-if-changed=build.rs
  cargo:compiler-rt=/home/jonahb/.cargo/registry/src/i.8713187.xyz-1ecc6299db9ec823/compiler_builtins-0.1.67/compiler-rt
  cargo:rustc-cfg=feature="unstable"
  cargo:rustc-cfg=feature="mem-unaligned"

  --- stderr
  thread 'main' panicked at 'RUST_COMPILER_RT_ROOT is not set', /home/jonahb/.cargo/registry/src/i.8713187.xyz-1ecc6299db9ec823/compiler_builtins-0.1.67/build.rs:491:21
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Copy link
Member

Choose a reason for hiding this comment

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

I'm on x86_64 too. I have never seen this error before. I have no clue why this would happen on x86_64.

Copy link
Contributor

Choose a reason for hiding this comment

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

That's related to my changes to support non-native integers: some builtins were missing in compiler-builtins, so I had to use compiler-rt to get them.

@antoyo antoyo merged commit 164aa39 into rust-lang:master Feb 19, 2022
@antoyo
Copy link
Contributor

antoyo commented Feb 19, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants