-
Notifications
You must be signed in to change notification settings - Fork 78
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
Conversation
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" $ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
d2c67f2
to
4cdcf03
Compare
Thanks! |
I hope this is correct, at least it makes it build again for me.