about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/rocm-modules/6/llvm/stage-3/lldb.nix
blob: 9b7d25e06d9d68ea7b183e8ae769bbef9728ce40 (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
{ stdenv
, callPackage
, rocmUpdateScript
, clang
, xz
, swig
, lua5_3
, graphviz
, gtest
, python3Packages
}:

callPackage ../base.nix rec {
  inherit stdenv rocmUpdateScript;
  buildTests = false; # FIXME: Bad pathing for clang executable in tests, using relative path most likely
  targetName = "lldb";
  targetDir = targetName;
  extraNativeBuildInputs = [ python3Packages.sphinx-automodapi ];

  extraBuildInputs = [
    xz
    swig
    lua5_3
    graphviz
    gtest
  ];

  extraCMakeFlags = [
    "-DLLDB_EXTERNAL_CLANG_RESOURCE_DIR=${clang}/resource-root/lib/clang/$clang_version"
    "-DLLDB_INCLUDE_TESTS=ON"
    "-DLLDB_INCLUDE_UNITTESTS=ON"
  ];

  extraPostPatch = ''
    export clang_version=`clang -v 2>&1 | grep "clang version " | grep -E -o "[0-9.-]+"`
  '';

  checkTargets = [ "check-${targetName}" ];
}