jolt 0.9.172__py3-none-any.whl → 0.9.435__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- jolt/__init__.py +80 -7
- jolt/__main__.py +9 -1
- jolt/bin/fstree-darwin-x86_64 +0 -0
- jolt/bin/fstree-linux-x86_64 +0 -0
- jolt/cache.py +596 -252
- jolt/chroot.py +36 -11
- jolt/cli.py +143 -130
- jolt/common_pb2.py +45 -45
- jolt/config.py +76 -40
- jolt/error.py +19 -4
- jolt/filesystem.py +2 -6
- jolt/graph.py +400 -82
- jolt/influence.py +110 -3
- jolt/loader.py +338 -174
- jolt/log.py +127 -31
- jolt/manifest.py +13 -46
- jolt/options.py +35 -11
- jolt/pkgs/abseil.py +42 -0
- jolt/pkgs/asio.py +25 -0
- jolt/pkgs/autoconf.py +41 -0
- jolt/pkgs/automake.py +41 -0
- jolt/pkgs/b2.py +31 -0
- jolt/pkgs/boost.py +111 -0
- jolt/pkgs/boringssl.py +32 -0
- jolt/pkgs/busybox.py +39 -0
- jolt/pkgs/bzip2.py +43 -0
- jolt/pkgs/cares.py +29 -0
- jolt/pkgs/catch2.py +36 -0
- jolt/pkgs/cbindgen.py +17 -0
- jolt/pkgs/cista.py +19 -0
- jolt/pkgs/clang.py +44 -0
- jolt/pkgs/cli11.py +24 -0
- jolt/pkgs/cmake.py +48 -0
- jolt/pkgs/cpython.py +196 -0
- jolt/pkgs/crun.py +29 -0
- jolt/pkgs/curl.py +38 -0
- jolt/pkgs/dbus.py +18 -0
- jolt/pkgs/double_conversion.py +24 -0
- jolt/pkgs/fastfloat.py +21 -0
- jolt/pkgs/ffmpeg.py +28 -0
- jolt/pkgs/flatbuffers.py +29 -0
- jolt/pkgs/fmt.py +27 -0
- jolt/pkgs/fstree.py +20 -0
- jolt/pkgs/gflags.py +18 -0
- jolt/pkgs/glib.py +18 -0
- jolt/pkgs/glog.py +25 -0
- jolt/pkgs/glslang.py +21 -0
- jolt/pkgs/golang.py +16 -11
- jolt/pkgs/googlebenchmark.py +18 -0
- jolt/pkgs/googletest.py +46 -0
- jolt/pkgs/gperf.py +15 -0
- jolt/pkgs/grpc.py +73 -0
- jolt/pkgs/hdf5.py +19 -0
- jolt/pkgs/help2man.py +14 -0
- jolt/pkgs/inja.py +28 -0
- jolt/pkgs/jsoncpp.py +31 -0
- jolt/pkgs/libarchive.py +43 -0
- jolt/pkgs/libcap.py +44 -0
- jolt/pkgs/libdrm.py +44 -0
- jolt/pkgs/libedit.py +42 -0
- jolt/pkgs/libevent.py +31 -0
- jolt/pkgs/libexpat.py +27 -0
- jolt/pkgs/libfastjson.py +21 -0
- jolt/pkgs/libffi.py +16 -0
- jolt/pkgs/libglvnd.py +30 -0
- jolt/pkgs/libogg.py +28 -0
- jolt/pkgs/libpciaccess.py +18 -0
- jolt/pkgs/libseccomp.py +21 -0
- jolt/pkgs/libtirpc.py +24 -0
- jolt/pkgs/libtool.py +42 -0
- jolt/pkgs/libunwind.py +35 -0
- jolt/pkgs/libva.py +18 -0
- jolt/pkgs/libvorbis.py +33 -0
- jolt/pkgs/libxml2.py +35 -0
- jolt/pkgs/libxslt.py +17 -0
- jolt/pkgs/libyajl.py +16 -0
- jolt/pkgs/llvm.py +81 -0
- jolt/pkgs/lua.py +54 -0
- jolt/pkgs/lz4.py +26 -0
- jolt/pkgs/m4.py +14 -0
- jolt/pkgs/make.py +17 -0
- jolt/pkgs/mesa.py +81 -0
- jolt/pkgs/meson.py +17 -0
- jolt/pkgs/mstch.py +28 -0
- jolt/pkgs/mysql.py +60 -0
- jolt/pkgs/nasm.py +49 -0
- jolt/pkgs/ncurses.py +30 -0
- jolt/pkgs/ng_log.py +25 -0
- jolt/pkgs/ninja.py +45 -0
- jolt/pkgs/nlohmann_json.py +25 -0
- jolt/pkgs/nodejs.py +19 -11
- jolt/pkgs/opencv.py +24 -0
- jolt/pkgs/openjdk.py +26 -0
- jolt/pkgs/openssl.py +103 -0
- jolt/pkgs/paho.py +76 -0
- jolt/pkgs/patchelf.py +16 -0
- jolt/pkgs/perl.py +42 -0
- jolt/pkgs/pkgconfig.py +64 -0
- jolt/pkgs/poco.py +39 -0
- jolt/pkgs/protobuf.py +77 -0
- jolt/pkgs/pugixml.py +27 -0
- jolt/pkgs/python.py +19 -0
- jolt/pkgs/qt.py +35 -0
- jolt/pkgs/rapidjson.py +26 -0
- jolt/pkgs/rapidyaml.py +28 -0
- jolt/pkgs/re2.py +30 -0
- jolt/pkgs/re2c.py +17 -0
- jolt/pkgs/readline.py +15 -0
- jolt/pkgs/rust.py +41 -0
- jolt/pkgs/sdl.py +28 -0
- jolt/pkgs/simdjson.py +27 -0
- jolt/pkgs/soci.py +46 -0
- jolt/pkgs/spdlog.py +29 -0
- jolt/pkgs/spirv_llvm.py +21 -0
- jolt/pkgs/spirv_tools.py +24 -0
- jolt/pkgs/sqlite.py +83 -0
- jolt/pkgs/ssl.py +12 -0
- jolt/pkgs/texinfo.py +15 -0
- jolt/pkgs/tomlplusplus.py +22 -0
- jolt/pkgs/wayland.py +26 -0
- jolt/pkgs/x11.py +58 -0
- jolt/pkgs/xerces_c.py +20 -0
- jolt/pkgs/xorg.py +360 -0
- jolt/pkgs/xz.py +29 -0
- jolt/pkgs/yamlcpp.py +30 -0
- jolt/pkgs/zeromq.py +47 -0
- jolt/pkgs/zlib.py +87 -0
- jolt/pkgs/zstd.py +33 -0
- jolt/plugins/alias.py +3 -0
- jolt/plugins/allure.py +2 -2
- jolt/plugins/autotools.py +66 -0
- jolt/plugins/cache.py +1 -1
- jolt/plugins/cmake.py +74 -6
- jolt/plugins/conan.py +238 -0
- jolt/plugins/cxxinfo.py +7 -0
- jolt/plugins/docker.py +76 -19
- jolt/plugins/email.xslt +141 -118
- jolt/plugins/environ.py +11 -0
- jolt/plugins/fetch.py +141 -0
- jolt/plugins/gdb.py +33 -14
- jolt/plugins/gerrit.py +0 -13
- jolt/plugins/git.py +248 -66
- jolt/plugins/googletest.py +1 -1
- jolt/plugins/http.py +1 -1
- jolt/plugins/libtool.py +63 -0
- jolt/plugins/linux.py +990 -0
- jolt/plugins/logstash.py +4 -4
- jolt/plugins/meson.py +61 -0
- jolt/plugins/ninja-compdb.py +96 -28
- jolt/plugins/ninja.py +424 -150
- jolt/plugins/paths.py +11 -1
- jolt/plugins/pkgconfig.py +219 -0
- jolt/plugins/podman.py +131 -87
- jolt/plugins/python.py +137 -0
- jolt/plugins/remote_execution/administration_pb2.py +27 -19
- jolt/plugins/remote_execution/log_pb2.py +12 -12
- jolt/plugins/remote_execution/scheduler_pb2.py +23 -23
- jolt/plugins/remote_execution/worker_pb2.py +19 -19
- jolt/plugins/report.py +7 -2
- jolt/plugins/rust.py +25 -0
- jolt/plugins/scheduler.py +135 -86
- jolt/plugins/selfdeploy/setup.py +6 -6
- jolt/plugins/selfdeploy.py +49 -31
- jolt/plugins/strings.py +35 -22
- jolt/plugins/symlinks.py +11 -4
- jolt/plugins/telemetry.py +1 -2
- jolt/plugins/timeline.py +13 -3
- jolt/scheduler.py +467 -165
- jolt/tasks.py +427 -111
- jolt/templates/timeline.html.template +44 -47
- jolt/timer.py +22 -0
- jolt/tools.py +527 -188
- jolt/utils.py +183 -3
- jolt/version.py +1 -1
- jolt/xmldom.py +12 -2
- {jolt-0.9.172.dist-info → jolt-0.9.435.dist-info}/METADATA +97 -41
- jolt-0.9.435.dist-info/RECORD +207 -0
- {jolt-0.9.172.dist-info → jolt-0.9.435.dist-info}/WHEEL +1 -1
- jolt/plugins/amqp.py +0 -855
- jolt/plugins/debian.py +0 -338
- jolt/plugins/repo.py +0 -253
- jolt/plugins/snap.py +0 -122
- jolt-0.9.172.dist-info/RECORD +0 -92
- {jolt-0.9.172.dist-info → jolt-0.9.435.dist-info}/entry_points.txt +0 -0
- {jolt-0.9.172.dist-info → jolt-0.9.435.dist-info}/top_level.txt +0 -0
jolt/plugins/logstash.py
CHANGED
|
@@ -13,9 +13,9 @@ log.verbose("[LogStash] Loaded")
|
|
|
13
13
|
|
|
14
14
|
class LogStashHooks(TaskHook):
|
|
15
15
|
def __init__(self):
|
|
16
|
-
self._uri = config.get("logstash", "http.uri")
|
|
16
|
+
self._uri = config.get("logstash", "http.uri", "http://logstash")
|
|
17
17
|
self._failed_enabled = config.getboolean("logstash", "failed", False)
|
|
18
|
-
self._finished_enabled = config.getboolean("logstash", "finished", False)
|
|
18
|
+
self._finished_enabled = config.getboolean("logstash", "passed", config.getboolean("logstash", "finished", False))
|
|
19
19
|
raise_error_if(not self._uri, "logstash.http.uri not configured")
|
|
20
20
|
|
|
21
21
|
def _get_uri(self, task):
|
|
@@ -25,8 +25,8 @@ class LogStashHooks(TaskHook):
|
|
|
25
25
|
task.canonical_name)
|
|
26
26
|
|
|
27
27
|
def _stash_log(self, task, logbuffer):
|
|
28
|
-
with task.tools.tmpdir("logstash") as
|
|
29
|
-
filepath = fs.path.join(
|
|
28
|
+
with task.tools.tmpdir("logstash") as tmp:
|
|
29
|
+
filepath = fs.path.join(tmp, "log")
|
|
30
30
|
with open(filepath, "w") as f:
|
|
31
31
|
f.write(logbuffer)
|
|
32
32
|
task.logstash = self._get_uri(task)
|
jolt/plugins/meson.py
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
from jolt import Task, attributes
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
@attributes.common_metadata()
|
|
5
|
+
class Meson(Task):
|
|
6
|
+
""" Base class for Meson-based build tasks. """
|
|
7
|
+
|
|
8
|
+
abstract = True
|
|
9
|
+
""" This is an abstract base class that should be inherited by concrete tasks. """
|
|
10
|
+
|
|
11
|
+
incremental = True
|
|
12
|
+
"""
|
|
13
|
+
Whether to use incremental builds.
|
|
14
|
+
If True, the build directories are preserved between runs.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
options = []
|
|
18
|
+
"""
|
|
19
|
+
Additional options to pass to the `meson` command.
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
srcdir = None
|
|
23
|
+
"""
|
|
24
|
+
Source directory for the Meson project.
|
|
25
|
+
|
|
26
|
+
If None, defaults to the task work directory (joltdir).
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
def clean(self, tools):
|
|
30
|
+
at = tools.meson(incremental=self.incremental)
|
|
31
|
+
at.clean()
|
|
32
|
+
|
|
33
|
+
def run(self, deps, tools):
|
|
34
|
+
self.deps = deps
|
|
35
|
+
options = tools.expand(self.options)
|
|
36
|
+
at = tools.meson(deps, incremental=self.incremental)
|
|
37
|
+
at.configure(self.srcdir or self.joltdir, *options)
|
|
38
|
+
at.build()
|
|
39
|
+
at.install()
|
|
40
|
+
|
|
41
|
+
def publish(self, artifact, tools):
|
|
42
|
+
at = tools.meson(incremental=self.incremental)
|
|
43
|
+
at.publish(artifact)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def requires(meson=True, ninja=True):
|
|
47
|
+
""" Decorator to add Meson and Ninja requirements to a task. """
|
|
48
|
+
|
|
49
|
+
import jolt.pkgs.meson
|
|
50
|
+
import jolt.pkgs.ninja
|
|
51
|
+
|
|
52
|
+
def decorate(cls):
|
|
53
|
+
if meson:
|
|
54
|
+
cls = attributes.requires("requires_meson")(cls)
|
|
55
|
+
cls.requires_meson = ["meson"]
|
|
56
|
+
if ninja:
|
|
57
|
+
cls = attributes.requires("requires_ninja")(cls)
|
|
58
|
+
cls.requires_ninja = ["ninja"]
|
|
59
|
+
return cls
|
|
60
|
+
|
|
61
|
+
return decorate
|
jolt/plugins/ninja-compdb.py
CHANGED
|
@@ -30,7 +30,7 @@ def patch(command, attrib, search, replace):
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
class CompDB(object):
|
|
33
|
-
def __init__(self, path="compile_commands.json", artifact=None):
|
|
33
|
+
def __init__(self, path="compdb/compile_commands.json", artifact=None):
|
|
34
34
|
self.commands = []
|
|
35
35
|
self.attribs = {}
|
|
36
36
|
if artifact:
|
|
@@ -89,30 +89,66 @@ def has_incpaths(artifact):
|
|
|
89
89
|
|
|
90
90
|
def stage_artifacts(artifacts, tools):
|
|
91
91
|
for artifact in filter(has_incpaths, artifacts):
|
|
92
|
-
tools.sandbox(artifact, incremental=True
|
|
92
|
+
tools.sandbox(artifact, incremental=True)
|
|
93
|
+
if fs.has_symlinks:
|
|
94
|
+
tools.sandbox(artifact, incremental=True, reflect=True)
|
|
93
95
|
|
|
94
96
|
|
|
95
|
-
def
|
|
97
|
+
def get_compdb_artifacts(task):
|
|
96
98
|
artifacts = []
|
|
99
|
+
|
|
100
|
+
def select_compdb(artifacts):
|
|
101
|
+
return list(filter(lambda a: a.name == "compdb", artifacts))
|
|
102
|
+
|
|
103
|
+
for dep in task.children:
|
|
104
|
+
artifacts.extend(dep.artifacts)
|
|
105
|
+
return select_compdb(task.artifacts)[0], select_compdb(artifacts)
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def get_task_artifacts(task):
|
|
109
|
+
compdb_artifact = task.get_artifact("compdb")
|
|
110
|
+
artifacts = [a for a in task.artifacts]
|
|
97
111
|
for dep in task.children:
|
|
98
112
|
artifacts.extend(dep.artifacts)
|
|
99
|
-
return
|
|
113
|
+
return compdb_artifact, artifacts
|
|
100
114
|
|
|
101
115
|
|
|
102
116
|
class CompDBHooks(TaskHook):
|
|
117
|
+
def __init__(self):
|
|
118
|
+
self._depfiles = config.getboolean("ninja-compdb", "depfiles", False)
|
|
119
|
+
|
|
120
|
+
def publish_compdb(self, artifact, tools):
|
|
121
|
+
with tools.cwd(self.outdir):
|
|
122
|
+
artifact.collect("**/*compile_commands.json", "compdb/")
|
|
123
|
+
|
|
124
|
+
def publish_depfiles(self, artifact, tools):
|
|
125
|
+
with tools.cwd(self.outdir):
|
|
126
|
+
artifact.collect("**/*.d", "depfiles/")
|
|
127
|
+
|
|
103
128
|
def task_created(self, task):
|
|
104
129
|
task.task.influence.append(StringInfluence("NinjaCompDB: v3"))
|
|
130
|
+
if isinstance(task.task, ninja.CXXProject):
|
|
131
|
+
compdb_artifact = task.cache.get_artifact(task, "compdb")
|
|
132
|
+
task.add_artifact(compdb_artifact)
|
|
133
|
+
publish_compdb = getattr(task.task, "publish_compdb", None)
|
|
134
|
+
if not publish_compdb:
|
|
135
|
+
setattr(task.task, "publish_compdb", CompDBHooks.publish_compdb.__get__(task.task, task.task.__class__))
|
|
136
|
+
if self._depfiles:
|
|
137
|
+
depfile_artifact = task.cache.get_artifact(task, "depfiles")
|
|
138
|
+
task.add_artifact(depfile_artifact)
|
|
139
|
+
publish_depfiles = getattr(task.task, "publish_depfiles", None)
|
|
140
|
+
if not publish_depfiles:
|
|
141
|
+
setattr(task.task, "publish_depfiles", CompDBHooks.publish_depfiles.__get__(task.task, task.task.__class__))
|
|
105
142
|
|
|
106
143
|
def task_postrun(self, task, deps, tools):
|
|
107
144
|
if not isinstance(task.task, ninja.CXXProject):
|
|
108
145
|
return
|
|
109
|
-
with tools.cwd(
|
|
110
|
-
utils.call_and_catch(tools.run, "ninja -f build.ninja -t compdb > compile_commands.json")
|
|
146
|
+
with tools.cwd(tools.wsroot):
|
|
147
|
+
utils.call_and_catch(tools.run, "ninja -f {outdir}/build.ninja -t compdb > {outdir}/compile_commands.json")
|
|
111
148
|
|
|
112
149
|
def task_postpublish(self, task, artifact, tools):
|
|
113
|
-
if
|
|
114
|
-
|
|
115
|
-
artifact.collect("*compile_commands.json")
|
|
150
|
+
if artifact.name != "compdb":
|
|
151
|
+
return
|
|
116
152
|
|
|
117
153
|
# Add information about the workspace and cachedir roots
|
|
118
154
|
db = CompDB(artifact=artifact)
|
|
@@ -123,30 +159,40 @@ class CompDBHooks(TaskHook):
|
|
|
123
159
|
|
|
124
160
|
if isinstance(task.task, ninja.CXXProject):
|
|
125
161
|
dbpath = fs.path.join(task.task.outdir, "all_compile_commands.json")
|
|
126
|
-
_, deps =
|
|
162
|
+
_, deps = get_compdb_artifacts(task)
|
|
127
163
|
db = CompDB(dbpath)
|
|
128
164
|
for dep in [artifact] + deps:
|
|
129
165
|
depdb = CompDB(artifact=dep)
|
|
130
166
|
depdb.read()
|
|
131
|
-
depdb.relocate(task)
|
|
167
|
+
depdb.relocate(task, sandboxes=fs.has_symlinks())
|
|
132
168
|
db.merge(depdb)
|
|
133
169
|
db.write()
|
|
134
|
-
artifact.collect(dbpath, flatten=True)
|
|
170
|
+
artifact.collect(dbpath, "compdb/", flatten=True)
|
|
135
171
|
|
|
136
|
-
def task_finished_execution(self, task):
|
|
172
|
+
def task_finished_execution(self, task: graph.TaskProxy):
|
|
137
173
|
if task.options.network or task.options.worker:
|
|
138
174
|
return
|
|
139
175
|
if not task.is_goal():
|
|
140
176
|
return
|
|
141
177
|
if isinstance(task.task, ninja.CXXProject):
|
|
142
|
-
artifact, deps =
|
|
143
|
-
db = CompDB("all_compile_commands.json", artifact)
|
|
178
|
+
artifact, deps = get_compdb_artifacts(task)
|
|
179
|
+
db = CompDB("compdb/all_compile_commands.json", artifact)
|
|
144
180
|
db.read()
|
|
145
|
-
db.relocate(task)
|
|
181
|
+
db.relocate(task, sandboxes=fs.has_symlinks())
|
|
146
182
|
outdir = task.tools.builddir("compdb", incremental=True)
|
|
147
183
|
dbpath = fs.path.join(outdir, "all_compile_commands.json")
|
|
148
184
|
db.write(dbpath, force=True)
|
|
149
|
-
|
|
185
|
+
|
|
186
|
+
# Save the compilation database to the configured path
|
|
187
|
+
if task.is_goal():
|
|
188
|
+
last_path = config.get("ninja-compdb", "path")
|
|
189
|
+
if last_path:
|
|
190
|
+
last_path = os.path.join(task.tools.wsroot, last_path)
|
|
191
|
+
task.tools.mkdirname(last_path)
|
|
192
|
+
db.write(last_path, force=True)
|
|
193
|
+
|
|
194
|
+
artifact, deps = get_task_artifacts(task)
|
|
195
|
+
stage_artifacts(deps, task.tools)
|
|
150
196
|
|
|
151
197
|
def task_finished_download(self, task):
|
|
152
198
|
self.task_finished_execution(task)
|
|
@@ -180,54 +226,76 @@ def compdb(ctx, task, default):
|
|
|
180
226
|
|
|
181
227
|
"""
|
|
182
228
|
|
|
183
|
-
manifest = ctx.obj["manifest"]
|
|
184
229
|
options = JoltOptions(default=default)
|
|
185
230
|
acache = cache.ArtifactCache.get(options)
|
|
186
231
|
TaskHookRegistry.get(options)
|
|
187
232
|
executors = scheduler.ExecutorRegistry.get(options)
|
|
188
233
|
registry = TaskRegistry.get()
|
|
189
234
|
strategy = scheduler.DownloadStrategy(executors, acache)
|
|
190
|
-
queue = scheduler.TaskQueue(
|
|
235
|
+
queue = scheduler.TaskQueue()
|
|
191
236
|
|
|
192
237
|
for params in default:
|
|
193
238
|
registry.set_default_parameters(params)
|
|
194
239
|
|
|
195
|
-
gb = graph.GraphBuilder(registry, acache,
|
|
240
|
+
gb = graph.GraphBuilder(registry, acache, options, progress=True)
|
|
196
241
|
dag = gb.build(task)
|
|
197
242
|
|
|
198
243
|
try:
|
|
199
|
-
with log.progress("Progress", dag.number_of_tasks(), " tasks", estimates=False, debug=False) as
|
|
244
|
+
with log.progress("Progress", dag.number_of_tasks(), " tasks", estimates=False, debug=False) as progress:
|
|
245
|
+
in_progress = set()
|
|
246
|
+
|
|
200
247
|
while dag.has_tasks() or not queue.empty():
|
|
201
|
-
leafs = dag.select(lambda graph, task: task.is_ready())
|
|
248
|
+
leafs = dag.select(lambda graph, task: task.is_ready() and task not in in_progress)
|
|
202
249
|
|
|
203
250
|
# Order the tasks by their weights to improve build times
|
|
204
251
|
leafs.sort(key=lambda x: x.weight)
|
|
205
252
|
|
|
206
253
|
while leafs:
|
|
207
254
|
task = leafs.pop()
|
|
208
|
-
|
|
255
|
+
executor = strategy.create_executor({}, task)
|
|
256
|
+
queue.submit(executor)
|
|
257
|
+
in_progress.add(task)
|
|
258
|
+
|
|
259
|
+
task, _ = queue.wait()
|
|
260
|
+
|
|
261
|
+
# Materialize workspace resources so that
|
|
262
|
+
# source code is available to the debugger.
|
|
263
|
+
if task.is_workspace_resource():
|
|
264
|
+
task.task.acquire_ws(force=True)
|
|
209
265
|
|
|
210
|
-
task
|
|
211
|
-
|
|
266
|
+
# Unpack the task if it is not a resource task and has a custom unpack method
|
|
267
|
+
if not task.is_resource():
|
|
268
|
+
if task.is_unpackable():
|
|
269
|
+
task.unpack()
|
|
270
|
+
|
|
271
|
+
progress.update(1)
|
|
212
272
|
|
|
213
273
|
except KeyboardInterrupt:
|
|
214
274
|
print()
|
|
215
275
|
log.warning("Interrupted by user")
|
|
216
276
|
try:
|
|
217
277
|
queue.abort()
|
|
278
|
+
executors.shutdown()
|
|
218
279
|
sys.exit(1)
|
|
219
280
|
except KeyboardInterrupt:
|
|
220
281
|
print()
|
|
221
282
|
log.warning("Interrupted again, exiting")
|
|
222
283
|
os._exit(1)
|
|
223
284
|
|
|
285
|
+
finally:
|
|
286
|
+
queue.shutdown()
|
|
287
|
+
|
|
224
288
|
for goal in dag.goals:
|
|
225
|
-
|
|
226
|
-
|
|
289
|
+
if goal.is_resource():
|
|
290
|
+
continue
|
|
291
|
+
if goal.is_alias():
|
|
292
|
+
continue
|
|
293
|
+
compdb_artifact, artifacts = get_task_artifacts(goal)
|
|
294
|
+
db = CompDB("compdb/all_compile_commands.json", compdb_artifact)
|
|
227
295
|
db.read()
|
|
228
296
|
db.relocate(goal, sandboxes=fs.has_symlinks())
|
|
229
297
|
outdir = goal.tools.builddir("compdb", incremental=True)
|
|
230
298
|
dbpath = fs.path.join(outdir, "all_compile_commands.json")
|
|
231
299
|
db.write(dbpath, force=True)
|
|
232
|
-
stage_artifacts(
|
|
300
|
+
stage_artifacts(artifacts, goal.tools)
|
|
233
301
|
log.info("Compilation DB: {}", dbpath)
|