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

cc-wrapper: add libcxx for libcxxClang #54624

Merged
merged 1 commit into from Jan 27, 2019
Merged

Conversation

matthewbauer
Copy link
Member

clang needs to find headers + libraries for compiling with libc++. We
need to add a libcxx argument to cc-wrapper. This means you do not
have to pass in c++ headers directly.

This resolves the last case remaining of #30670. Darwin clang++ now
works properly.

Fixes #30670

clang needs to find headers + libraries for compiling with libc++. We
need to add a libcxx argument to cc-wrapper. This means you do not
have to pass in c++ headers directly.

This resolves the last case remaining of NixOS#30670. Darwin clang++ now
works properly.

Fixes NixOS#30670
@dtzWill
Copy link
Member

dtzWill commented Jan 27, 2019

Is this Darwin-only?

We previously had tests for this--were they failing? They seem to pass for me in my tree, FWIW.

I use libcxxStdenv for various things (including my system's nix) so I'm not sure what this is supposed to fix if it's not Darwin-only.

(regardless, is there a particular usage/scenario fixed by this? And should that be a test to ensure this works in the future?)

@matthewbauer
Copy link
Member Author

This makes clang++ work outside of a Nix derivation... It's a kind of specific use case but was often an issue. We provide it for g++, so we might as well make it work with clang.

@aakropotkin
Copy link
Contributor

aakropotkin commented Jul 6, 2020

Is this Darwin-only?

We previously had tests for this--were they failing? They seem to pass for me in my tree, FWIW.

I use libcxxStdenv for various things (including my system's nix) so I'm not sure what this is supposed to fix if it's not Darwin-only.

(regardless, is there a particular usage/scenario fixed by this? And should that be a test to ensure this works in the future?)

I completely agree, why does this not work on NixOS systems as well?
I am pulling my hair out just trying to hack around on a clang-c example.

I love NixOS but it's times like this that I get really frustrated with it...

I'm not always in the mood to write up a whole shell.nix for a little throwaway example; nix-shell -p clang or nix-shell -p llvmPackages.libclang should "work out the box".

JFC I'm not criticizing the author, I'm asking why this behavior is only for Darwin?

@Ericson2314
Copy link
Member

Ericson2314 commented Jul 6, 2020

It might be better since f3f7612

@Mic92
Copy link
Member

Mic92 commented Jul 6, 2020

Is this Darwin-only?
We previously had tests for this--were they failing? They seem to pass for me in my tree, FWIW.
I use libcxxStdenv for various things (including my system's nix) so I'm not sure what this is supposed to fix if it's not Darwin-only.
(regardless, is there a particular usage/scenario fixed by this? And should that be a test to ensure this works in the future?)

I completely agree, why does this not work on NixOS systems as well?
I am pulling my hair out just trying to hack around on a clang-c example.

I love NixOS but it's times like this that I get really frustrated with it...

I'm not always in the mood to write up a whole shell.nix for a little throwaway example; nix-shell -p clang or nix-shell -p llvmPackages.libclang should "work out the box".

JFC I'm not criticizing the author, I'm asking why this behavior is only for Darwin?

nix-shell -p clang would be nice to work until this happens you may find the following shell functions useful to improve your workflow: https://github.com/direnv/direnv/wiki/Nix#shell-function-to-quickly-setup-nix--direnv-in-a-new-project

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

Successfully merging this pull request may close these issues.

None yet

6 participants