about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/rocm-modules/6/llvm/stage-2/libcxx.nix
blob: 473227242765be2cd8f00ec07060929d27e88a9b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{ stdenv
, callPackage
, rocmUpdateScript
}:

callPackage ../base.nix rec {
  inherit stdenv rocmUpdateScript;
  buildMan = false; # No man pages to build
  targetName = "libcxx";
  targetDir = "runtimes";

  targetRuntimes = [
    "libunwind"
    "libcxxabi"
    targetName
  ];

  extraCMakeFlags = [
    "-DLIBCXX_INCLUDE_DOCS=ON"
    "-DLIBCXX_INCLUDE_TESTS=ON"
    "-DLIBCXX_USE_COMPILER_RT=ON"
    "-DLIBCXX_CXX_ABI=libcxxabi"

    # Workaround having to build combined
    "-DLIBUNWIND_INCLUDE_DOCS=OFF"
    "-DLIBUNWIND_INCLUDE_TESTS=OFF"
    "-DLIBUNWIND_USE_COMPILER_RT=ON"
    "-DLIBUNWIND_INSTALL_LIBRARY=OFF"
    "-DLIBUNWIND_INSTALL_HEADERS=OFF"
    "-DLIBCXXABI_INCLUDE_TESTS=OFF"
    "-DLIBCXXABI_USE_LLVM_UNWINDER=ON"
    "-DLIBCXXABI_USE_COMPILER_RT=ON"
    "-DLIBCXXABI_INSTALL_LIBRARY=OFF"
    "-DLIBCXXABI_INSTALL_HEADERS=OFF"
  ];

  # Most of these can't find `bash` or `mkdir`, might just be hard-coded paths, or PATH is altered
  extraPostPatch = ''
    chmod +w -R ../libcxx/test/{libcxx,std}
    cat ${./1000-libcxx-failing-tests.list} | xargs -d \\n rm
  '';
}