-
Notifications
You must be signed in to change notification settings - Fork 252
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
CMake correctness; streamline nix-shell
environment
#343
base: master
Are you sure you want to change the base?
Conversation
Also, don't assume `llvm-config --libdir` shares the same `lib/` root as `llvm-config --cmakedir`.
Rustup is no longer required when using `nix-shell`. Instead, the required Rust nightly is already available.
awesome! I did a |
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 looks good overall and improves error reporting, which is always a plus. I'm not a nix expert but the nix changes look plausible.
let llvm_config_missing = " | ||
Couldn't find `llvm-config`. Make sure `llvm-config` is on $PATH then | ||
re-build. | ||
"; |
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.
As far as I can tell, with these changes this string becomes dead. But I'm not opposed to keeping it around as a reminder to add better error handling for this situation.
@bb010g @fw-immunant, can this be merged now? @fw-immunant approved it already and I just fixed the merge conflicts. @thedataking, the |
CI is now failing after I re-triggered it with the merge: Couldn't find Clang cmake dir. Try setting the `CLANG_CMAKE_DIR` environment
variable or make sure `llvm-config` is on $PATH then re-build. For example:
$ export CLANG_CMAKE_DIR=/usr/local/opt/llvm/lib/cmake/clang
: Os { code: 2, kind: NotFound, message: "No such file or directory" }', c2rust-ast-exporter/build.rs:343:22 This might be flaky CI again since it only happened on Ubuntu 18. |
…` inline interpolation feature.
Ubuntu 18 CI failed again, so it's probably not flaky. I'm not sure why it's only happening in Ubuntu 18, and not even in Ubuntu 20. The build scripts for the docker containers for those should be exactly the same. |
…ken in GitHub Actions fixes the error as the repo is now public.
c54f7ca, removing the |
…URL` CI failure by using `pull_request_target`.
…h `?` and `.note()?`.
It's failing in Ubuntu 18 because Ubuntu 18 uses llvm 6, which doesn't have a |
@kkysen A fallback sounds reasonable. I don't think I tested on older LLVMs. |
These allow
nix-shell --pure --show-trace --keep-going --run 'cargo build --release'
from a clean checkout to succeed.Don't assume LLVM & Clang share the same lib dir
Also, don't assume
llvm-config --libdir
shares the samelib/
root asllvm-config --cmakedir
.streamline
nix-shell
environmentRustup is no longer required when using
nix-shell
. Instead, the required Rust nightly is already available.