-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
LIBCLANG_PATH hook #67725
Closed
Closed
LIBCLANG_PATH hook #67725
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rust’s clang-sys has a few ways to handle this: > libclang shared libraries will be searched for in the following directories: > the directory provided by the LIBCLANG_PATH environment variable > the bin and lib directories in the directory provided by llvm-config --libdir > the directories provided by LD_LIBRARY_PATH environment variable > a list of likely directories for the target platform (e.g., /usr/local/lib on Linux) > macOS only: the toolchain directory in the directory provided by xcode-select --print-path The other methods don’t work. LLVM still does not support pkg-config, llvm-config won’t have the libclang because we build clang and llvm separately, and LD_LIBRARY_PATH shouldn’t be messed with. More discussion here: https://discourse.nixos.org/t/how-to-correctly-populate-a-clang-and-llvm-development-environment-using-nix-shell/3864/2
This is set by clang’s setup-hook.
ofborg
bot
added
10.rebuild-darwin-stdenv
This PR causes stdenv to rebuild
8.has: package (new)
This PR adds a new package
10.rebuild-darwin: 501+
10.rebuild-darwin: 5001+
10.rebuild-linux: 101-500
labels
Aug 29, 2019
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: |
Can we please open this against |
ofborg
bot
added
the
2.status: merge conflict
This PR has merge conflicts with the target branch
label
Apr 8, 2020
@matthewbauer I fixed the conflicts against staging: https://github.com/JJJollyjim/nixpkgs/tree/libclang-hook |
10 tasks
Closing in favor of #85489 |
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
2.status: merge conflict
This PR has merge conflicts with the target branch
8.has: package (new)
This PR adds a new package
10.rebuild-darwin: 501+
10.rebuild-darwin: 5001+
10.rebuild-darwin-stdenv
This PR causes stdenv to rebuild
10.rebuild-linux: 101-500
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Rust’s clang-sys has a few ways to handle finding libclang:
The other methods don’t work. LLVM still does not support pkg-config,
llvm-config won’t have the libclang because we build clang and llvm
separately, and LD_LIBRARY_PATH shouldn’t be messed with.
More discussion here:
https://discourse.nixos.org/t/how-to-correctly-populate-a-clang-and-llvm-development-environment-using-nix-shell/3864/2
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nix-review --run "nix-review wip"
./result/bin/
)nix path-info -S
before and after)Notify maintainers
cc @