In preparation for the deprecation of `stdenv.isX`.
These shorthands are not conducive to cross-compilation because they
hide the platforms.
Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way
One example of why this is bad and especially affects compiler packages
https://www.github.com/NixOS/nixpkgs/pull/343059
There are too many files to go through manually but a treewide should
get users thinking when they see a `hostPlatform.isX` in a place where it
doesn't make sense.
```
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is"
fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is"
fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is"
```
- merge libcxxabi into libcxx for LLVM 12, 13, 14, 15, 16, 17, and git.
- remove the link time workaround `-lc++ -lc++abi` from 58 packages as it is no longer required.
- fixes https://github.com/NixOS/nixpkgs/issues/166205
- provides alternative fixes for. https://github.com/NixOS/nixpkgs/issues/269548https://github.com/NixOS/nix/issues/9640
- pkgsCross.x86_64-freebsd builds work again
This change can be represented in 3 stages
1. merge libcxxabi into libcxx -- files: pkgs/development/compilers/llvm/[12, git]/{libcxx, libcxxabi}
2. update stdenv to account for merge -- files: stdenv.{adapters, cc.wrapper, darwin}
3. remove all references to libcxxabi outside of llvm (about 58 packages modified)
### merging libcxxabi into libcxx
- take the union of the libcxxabi and libcxx cmake flags
- eliminate the libcxx-headers-only package - it was only needed to break libcxx <-> libcxxabi circular dependency
- libcxx.cxxabi is removed. external cxxabi (freebsd) will symlink headers / libs into libcxx.
- darwin will re-export the libcxxabi symbols into libcxx so linking `-lc++` is sufficient.
- linux/freebsd `libc++.so` is a linker script `LINK(libc++.so.1, -lc++abi)` making `-lc++` sufficient.
- libcxx/default.nix [12, 17] are identical except for patches and `LIBCXX_ADDITIONAL_LIBRARIES` (only used in 16+)
- git/libcxx/defaul.nix does not link with -nostdlib when useLLVM is true so flag is removed. this is not much different than before as libcxxabi used -nostdlib where libcxx did not, so libc was linked in anyway.
### stdenv changes
- darwin bootstrap, remove references to libcxxabi and cxxabi
- cc-wrapper: remove c++ link workaround when libcxx.cxxabi doesn't exist (still exists for LLVM pre 12)
- adapter: update overrideLibcxx to account for a pkgs.stdenv that only has libcxx
### 58 package updates
- remove `NIX_LDFLAGS = "-l${stdenv.cc.libcxx.cxxabi.libName}` as no longer needed
- swift, nodejs_v8 remove libcxxabi references in the clang override
https://github.com/NixOS/nixpkgs/pull/292043
This is very useful in conjunction with meta.pkgConfigModules, as the
new tester can use the list provided by this meta attribute as a default
value for moduleNames, making its usage in passthru.tests very
convenient.
For backwards compatibility, a shim under the old name is maintained
with a warning.
Since years I'm not maintaining anything of the list below other
than some updates when I needed them for some reason. Other people
is doing that maintenance on my behalf so I better take me out but
for very few packages. Finally!
Semi-automatic update. These checks were performed:
- built on NixOS
- ran `/nix/store/3wqj8kyahgi1r25wp8vfhhsg0m1mzpkx-pjsip-2.7.2/bin/pjsua -h` got 0 exit code
- ran `/nix/store/3wqj8kyahgi1r25wp8vfhhsg0m1mzpkx-pjsip-2.7.2/bin/pjsua --help` got 0 exit code
- ran `/nix/store/3wqj8kyahgi1r25wp8vfhhsg0m1mzpkx-pjsip-2.7.2/bin/pjsua help` got 0 exit code
- ran `/nix/store/3wqj8kyahgi1r25wp8vfhhsg0m1mzpkx-pjsip-2.7.2/bin/pjsua -V` and found version 2.7.2
- ran `/nix/store/3wqj8kyahgi1r25wp8vfhhsg0m1mzpkx-pjsip-2.7.2/bin/pjsua -v` and found version 2.7.2
- ran `/nix/store/3wqj8kyahgi1r25wp8vfhhsg0m1mzpkx-pjsip-2.7.2/bin/pjsua --version` and found version 2.7.2
- ran `/nix/store/3wqj8kyahgi1r25wp8vfhhsg0m1mzpkx-pjsip-2.7.2/bin/pjsua version` and found version 2.7.2
- ran `/nix/store/3wqj8kyahgi1r25wp8vfhhsg0m1mzpkx-pjsip-2.7.2/bin/pjsua -h` and found version 2.7.2
- ran `/nix/store/3wqj8kyahgi1r25wp8vfhhsg0m1mzpkx-pjsip-2.7.2/bin/pjsua --help` and found version 2.7.2
- ran `/nix/store/3wqj8kyahgi1r25wp8vfhhsg0m1mzpkx-pjsip-2.7.2/bin/pjsua help` and found version 2.7.2
- found 2.7.2 with grep in /nix/store/3wqj8kyahgi1r25wp8vfhhsg0m1mzpkx-pjsip-2.7.2
- found 2.7.2 in filename of file in /nix/store/3wqj8kyahgi1r25wp8vfhhsg0m1mzpkx-pjsip-2.7.2
cc "@viric @olynch"