Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/lldb/, dev-util/lldb/files/4.0.0/
Date: Mon, 06 Mar 2017 22:18:37
Message-Id: 1488838696.a7c054165db900ce4a4aa17ccdf0c2c8cebbc717.mgorny@gentoo
1 commit: a7c054165db900ce4a4aa17ccdf0c2c8cebbc717
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Mon Mar 6 19:25:37 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Mon Mar 6 22:18:16 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7c05416
7
8 dev-util/lldb: Bump to 4.0.0rc3, fix tests
9
10 dev-util/lldb/Manifest | 4 +-
11 ...nding-LLDB-tools-when-building-stand-alon.patch | 102 +++++++++++++++++++++
12 ...lldb-4.0.0_rc2.ebuild => lldb-4.0.0_rc3.ebuild} | 7 ++
13 3 files changed, 111 insertions(+), 2 deletions(-)
14
15 diff --git a/dev-util/lldb/Manifest b/dev-util/lldb/Manifest
16 index 83740582350..c0bf1a500a4 100644
17 --- a/dev-util/lldb/Manifest
18 +++ b/dev-util/lldb/Manifest
19 @@ -1,2 +1,2 @@
20 -DIST lldb-4.0.0rc2.src.tar.xz 19122472 SHA256 07cce3289d97a8f7fbd069e8105fecf722fb3631d9b0822a5b1dacf0d7a1713c SHA512 bafd5eb02b4336e64b2affd140d6f77394cd54a62ebc475cf4ee6531dcd382e4455955c7d3c0d569b057b7dbabf5b7f15bcf6bdfce4bc5c52b8801b9fc1530c7 WHIRLPOOL 78d53ce49226a773e6f69c6c0663df67a895620c33d538f2a1bf1c17bbb25c0d0a175c1e670f363bfb93bd36a0cf769623b6eb8eafdee46dc08e9df97272cbc1
21 -DIST llvm-4.0.0rc2.src.tar.xz 21005416 SHA256 2257faed3795fedfc509d6dd5905be158231c508c6fcaaa02e4a09c5e8dadbe1 SHA512 537356226123b8c9454ec3dfc3adbfb13cfa4bd35f530b85f2b3242391ea1fbd9abf65dfbb62db533e6eae4c9049bb260fb21dccfeb7e355306f4621d35474b7 WHIRLPOOL d79f343ca00c60dd49a3ada4808e779c45210ab03e365e614563b54879ac72b7e80b4022641db10ad2075a0d417ba7c182f9d3abf8c6b012622c0d1541a7dc69
22 +DIST lldb-4.0.0rc3.src.tar.xz 19123208 SHA256 e74352fabc0f76556e360fa3b7e971665931bebde3ce7f437ff2714a8f9f20e3 SHA512 5b06768a9d464754e0a18486b5e0fda3f9198291040c0e179d09a37772c6e68e2f5ac2a08a6b384d2e72b685bd8b36d3b2a085213b1d347b5cbaacfa9f62db1a WHIRLPOOL 643633baa634f32b1c4551a86fa3252642bd7f61c3c6d7e6bdbc0b983e6ccce6f3f8e5c8eeb88b40a41c7937d50346b574ea8329f5badfac08ccad98ce2fa556
23 +DIST llvm-4.0.0rc3.src.tar.xz 21013952 SHA256 6727c98f436581adc6b8f9c2ad055d8e27832f60a127e97b3451eba85ef28345 SHA512 a64eaf59388be6641b6d654ceddd63232f83ad50226204255a0c9bcc3d1b36470f7acbf43615b2bd9758cd6077f55fc6155803a12947e1bd2be5661e1ff07e4a WHIRLPOOL 7aef4913c8a33ff0e35670063cb26ddd5d7b72cb08c699116dd93c72f25b6b75187bdf6bfd63b3d3b5c964c118c2db71893024524b864412f4f8daa594be7faa
24
25 diff --git a/dev-util/lldb/files/4.0.0/0001-test-Fix-finding-LLDB-tools-when-building-stand-alon.patch b/dev-util/lldb/files/4.0.0/0001-test-Fix-finding-LLDB-tools-when-building-stand-alon.patch
26 new file mode 100644
27 index 00000000000..1b183d860a2
28 --- /dev/null
29 +++ b/dev-util/lldb/files/4.0.0/0001-test-Fix-finding-LLDB-tools-when-building-stand-alon.patch
30 @@ -0,0 +1,102 @@
31 +From 6a9aab954c32a2d3d13a0fe5fc984e9787e9f794 Mon Sep 17 00:00:00 2001
32 +From: Michal Gorny <mgorny@g.o>
33 +Date: Sun, 19 Feb 2017 22:11:38 +0000
34 +Subject: [PATCH] [test] Fix finding LLDB tools when building stand-alone
35 +
36 +Use both LLDB- and LLVM-specific tool/library directories when LLDB is
37 +being built stand-alone. This ensures that the freshly-built tools
38 +(and libraries) are used correctly.
39 +
40 +Without this patch, the test suite uses LLVM_TOOLS_DIR and LLVM_LIBS_DIR
41 +to locate lldb, and set PATH and LD_LIBRARY_PATH. When doing
42 +a stand-alone build, these variables represent the installed LLVM.
43 +As a result, tests either fail due to missing lldb executable
44 +or use an earlier installed LLDB version rather than the one being
45 +built.
46 +
47 +To solve this, additional LLDB_TOOLS_DIR and LLDB_LIBS_DIR variables
48 +are added and populated using LLVM_*_OUTPUT_INTDIR. Those variables
49 +contain directories used to output built executables and libraries.
50 +In stand-alone builds, they represent the build-tree directories
51 +used by LLDB. In integrated builds, they have the same values as
52 +LLVM_*_DIR and therefore using them does not harm.
53 +
54 +The new variables are prepended to PATH and LD_LIBRARY_PATH to ensure
55 +that freshly built binaries are preferred over potentially earlier
56 +installed ones. Furthermore, paths used to locate various tools are
57 +updated to match appropriate locations.
58 +
59 +Differential Revision: https://reviews.llvm.org/D29985
60 +
61 +git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@295621 91177308-0d34-0410-b5e6-96231b3b80d8
62 +---
63 + lit/lit.cfg | 18 ++++++++++++------
64 + lit/lit.site.cfg.in | 2 ++
65 + 2 files changed, 14 insertions(+), 6 deletions(-)
66 +
67 +diff --git a/lit/lit.cfg b/lit/lit.cfg
68 +index dd89b45fa..a3d5f9ca7 100644
69 +--- a/lit/lit.cfg
70 ++++ b/lit/lit.cfg
71 +@@ -39,18 +39,24 @@ config.llvm_obj_root = getattr(config, 'llvm_obj_root', None)
72 +
73 + # Tweak the PATH to include the tools dir and the scripts dir.
74 + if lldb_obj_root is not None:
75 ++ lldb_tools_dir = getattr(config, 'lldb_tools_dir', None)
76 ++ if not lldb_tools_dir:
77 ++ lit_config.fatal('No LLDB tools dir set!')
78 + llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
79 + if not llvm_tools_dir:
80 + lit_config.fatal('No LLVM tools dir set!')
81 +- path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH']))
82 ++ path = os.path.pathsep.join((lldb_tools_dir, llvm_tools_dir, config.environment['PATH']))
83 + path = os.path.pathsep.join((os.path.join(getattr(config, 'llvm_src_root', None),'test','Scripts'),path))
84 +
85 + config.environment['PATH'] = path
86 +
87 ++ lldb_libs_dir = getattr(config, 'lldb_libs_dir', None)
88 ++ if not lldb_libs_dir:
89 ++ lit_config.fatal('No LLDB libs dir set!')
90 + llvm_libs_dir = getattr(config, 'llvm_libs_dir', None)
91 + if not llvm_libs_dir:
92 + lit_config.fatal('No LLVM libs dir set!')
93 +- path = os.path.pathsep.join((llvm_libs_dir,
94 ++ path = os.path.pathsep.join((lldb_libs_dir, llvm_libs_dir,
95 + config.environment.get('LD_LIBRARY_PATH','')))
96 + config.environment['LD_LIBRARY_PATH'] = path
97 +
98 +@@ -115,14 +121,14 @@ if config.test_exec_root is None:
99 + # Register substitutions
100 + config.substitutions.append(('%python', config.python_executable))
101 +
102 +-debugserver = lit.util.which('debugserver', llvm_tools_dir)
103 +-lldb = lit.util.which('lldb', llvm_tools_dir)
104 ++debugserver = lit.util.which('debugserver', lldb_tools_dir)
105 ++lldb = lit.util.which('lldb', lldb_tools_dir)
106 +
107 + if not os.path.exists(config.cc):
108 +- config.cc = lit.util.which(config.cc, llvm_tools_dir)
109 ++ config.cc = lit.util.which(config.cc, config.environment['PATH'])
110 +
111 + if not os.path.exists(config.cxx):
112 +- config.cxx = lit.util.which(config.cxx, llvm_tools_dir)
113 ++ config.cxx = lit.util.which(config.cxx, config.environment['PATH'])
114 +
115 + if platform.system() in ['Darwin']:
116 + try:
117 +diff --git a/lit/lit.site.cfg.in b/lit/lit.site.cfg.in
118 +index 904521c9d..03aa3df9a 100644
119 +--- a/lit/lit.site.cfg.in
120 ++++ b/lit/lit.site.cfg.in
121 +@@ -6,6 +6,8 @@ config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
122 + config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
123 + config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
124 + config.lldb_obj_root = "@LLDB_BINARY_DIR@"
125 ++config.lldb_libs_dir = "@LLVM_LIBRARY_OUTPUT_INTDIR@"
126 ++config.lldb_tools_dir = "@LLVM_RUNTIME_OUTPUT_INTDIR@"
127 + config.target_triple = "@TARGET_TRIPLE@"
128 + config.python_executable = "@PYTHON_EXECUTABLE@"
129 + config.cc = "@CMAKE_C_COMPILER@"
130 +--
131 +2.12.0
132 +
133
134 diff --git a/dev-util/lldb/lldb-4.0.0_rc2.ebuild b/dev-util/lldb/lldb-4.0.0_rc3.ebuild
135 similarity index 94%
136 rename from dev-util/lldb/lldb-4.0.0_rc2.ebuild
137 rename to dev-util/lldb/lldb-4.0.0_rc3.ebuild
138 index 199b5a600e8..bb693c4cf66 100644
139 --- a/dev-util/lldb/lldb-4.0.0_rc2.ebuild
140 +++ b/dev-util/lldb/lldb-4.0.0_rc3.ebuild
141 @@ -55,6 +55,13 @@ src_unpack() {
142 fi
143 }
144
145 +src_prepare() {
146 + # fix tests in stand-alone build
147 + eapply "${FILESDIR}"/4.0.0/0001-test-Fix-finding-LLDB-tools-when-building-stand-alon.patch
148 +
149 + eapply_user
150 +}
151 +
152 src_configure() {
153 local mycmakeargs=(
154 -DLLDB_DISABLE_CURSES=$(usex !ncurses)