Skip to content

Commit

Permalink
tests.cc-wrapper.supported: add test for cxxabi header
Browse files Browse the repository at this point in the history
`#include <cxxabi.h>`

`/nix/store/02wpjmp2zjjxz13z7g599mniwi25zkcy-libcxxabi-16.0.6-dev/include/cxxabi.h:20:10: fatal error: '__cxxabi_config.h' file not found`
  • Loading branch information
Artturin committed Sep 17, 2023
1 parent a26d168 commit 185dc1b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkgs/test/cc-wrapper/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 8 additions & 0 deletions pkgs/test/cc-wrapper/include-cxxabi.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include <cxxabi.h>
#include <iostream>

int main(int argc, char **argv)
{
std::cerr << "ok" << std::endl;
return 0;
}

0 comments on commit 185dc1b

Please sign in to comment.