libcxxabi: also install libc++abi.a#51960
Conversation
|
I haven't touched |
There was a problem hiding this comment.
In glibc we have a static output. How about this one?
There was a problem hiding this comment.
I am not very supportive of static outputs. The issue is lots of things like pkgconfig hardcode the libdir. Instead, i would recommend adding an “enableStatic” argument that can be overriden.
There was a problem hiding this comment.
I modeled this on libstdc++, which just bundles both static and non-static outputs into the gcc derivation.
The static library is pretty small and we were building it anyway and throwing it away. This is meant as a tiny patch that just allows us to build static libraries with libcxxStdenv, which was previously broken. I tried not to make any architectural decisions :)
There was a problem hiding this comment.
The argument expected by makeStaticLibraries has a double negative — it's called dontDisableStatic. If we're going to add an argument to things, shouldn't we stick to that convention?
[twey@uruz:~/nix/nixpkgs]$ grep -Irc enableStatic | awk -F: '{ s += $2 } END { print s }'
49
[twey@uruz:~/nix/nixpkgs]$ grep -Irc dontDisableStatic | awk -F: '{ s += $2 } END { print s }'
52
There doesn't seem to be consensus 😆
There was a problem hiding this comment.
But there are many more files with the double negative.
[twey@uruz:~/nix/nixpkgs]$ grep -Irl dontDisableStatic | wc -l
49
[twey@uruz:~/nix/nixpkgs]$ grep -Irl enableStatic | wc -l
19
There was a problem hiding this comment.
Yeah dontDisableStatic would be fine as well. The double negative is kind of awkward in my opinion though.
But yeah, this sounds okay if it's consistent with how we handle gcc.
There was a problem hiding this comment.
I feel like it would be weird to have an enableStatic flag just for libc++abi. If anything it should go in libc++ — since static libc++ is useless without static libc++abi.
Are we okay to merge this?
|
This should have not gone to master! |
Motivation for this change
Allows building static binaries with
libcxxStdenv. The file is only 536K in size, so it seems a waste to throw it away after building it.Things done
sandboxinnix.confon non-NixOS)nix-shell -p nox --run "nox-review wip"./result/bin/)nix path-info -Sbefore and after)