mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
Merge pull request #255488 from natto1784/libcxxabi
This commit is contained in:
commit
6f27ba80ea
@ -469,6 +469,7 @@ stdenv.mkDerivation {
|
||||
''
|
||||
+ optionalString (libcxx.isLLVM or false) ''
|
||||
echo "-isystem ${lib.getDev libcxx}/include/c++/v1" >> $out/nix-support/libcxx-cxxflags
|
||||
echo "-isystem ${lib.getDev libcxx.cxxabi}/include/c++/v1" >> $out/nix-support/libcxx-cxxflags
|
||||
echo "-stdlib=libc++" >> $out/nix-support/libcxx-ldflags
|
||||
echo "-l${libcxx.cxxabi.libName}" >> $out/nix-support/libcxx-ldflags
|
||||
''
|
||||
|
@ -255,14 +255,6 @@ in let
|
||||
[ "-rtlib=compiler-rt"
|
||||
"-Wno-unused-command-line-argument"
|
||||
"-B${targetLlvmLibraries.compiler-rt}/lib"
|
||||
|
||||
# Combat "__cxxabi_config.h not found". Maybe this could be fixed by
|
||||
# copying these headers into libcxx? Note that building libcxx
|
||||
# outside of monorepo isn't supported anymore, might be related to
|
||||
# https://github.com/llvm/llvm-project/issues/55632
|
||||
# ("16.0.3 libcxx, libcxxabi: circular build dependencies")
|
||||
# Looks like the machinery changed in https://reviews.llvm.org/D120727.
|
||||
"-I${lib.getDev targetLlvmLibraries.libcxx.cxxabi}/include/c++/v1"
|
||||
]
|
||||
++ lib.optional (!stdenv.targetPlatform.isWasm) "--unwindlib=libunwind"
|
||||
++ lib.optional
|
||||
|
@ -30,6 +30,13 @@ in stdenv.mkDerivation {
|
||||
$CXX -o cxx-check ${./cxx-main.cc}
|
||||
${emulator} ./cxx-check
|
||||
|
||||
# test for https://github.com/NixOS/nixpkgs/issues/214524#issuecomment-1431745905
|
||||
# .../include/cxxabi.h:20:10: fatal error: '__cxxabi_config.h' file not found
|
||||
# in libcxxStdenv
|
||||
echo "checking whether cxxabi.h can be included... " >&2
|
||||
$CXX -o include-cxxabi ${./include-cxxabi.cc}
|
||||
${emulator} ./include-cxxabi
|
||||
|
||||
${lib.optionalString (stdenv.isDarwin && stdenv.cc.isClang) ''
|
||||
echo "checking whether compiler can build with CoreFoundation.framework... " >&2
|
||||
mkdir -p foo/lib
|
||||
|
8
pkgs/test/cc-wrapper/include-cxxabi.cc
Normal file
8
pkgs/test/cc-wrapper/include-cxxabi.cc
Normal file
@ -0,0 +1,8 @@
|
||||
#include <cxxabi.h>
|
||||
#include <iostream>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
std::cerr << "ok" << std::endl;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user