mirror of https://gitlab.com/ita1024/waf.git
Improve fast_partial compatibility #2240
This commit is contained in:
parent
497b875a89
commit
9b3ab4b874
|
@ -18,6 +18,7 @@ Usage::
|
||||||
opt.load('fast_partial')
|
opt.load('fast_partial')
|
||||||
|
|
||||||
Assumptions:
|
Assumptions:
|
||||||
|
* Start with a clean build (run "waf distclean" after enabling)
|
||||||
* Mostly for C/C++/Fortran targets with link tasks (object-only targets are not handled)
|
* Mostly for C/C++/Fortran targets with link tasks (object-only targets are not handled)
|
||||||
try it in the folder generated by utils/genbench.py
|
try it in the folder generated by utils/genbench.py
|
||||||
* For full project builds: no --targets and no pruning from subfolders
|
* For full project builds: no --targets and no pruning from subfolders
|
||||||
|
@ -131,12 +132,18 @@ class bld_proxy(object):
|
||||||
data[x] = getattr(self, x)
|
data[x] = getattr(self, x)
|
||||||
db = os.path.join(self.variant_dir, Context.DBFILE + self.store_key)
|
db = os.path.join(self.variant_dir, Context.DBFILE + self.store_key)
|
||||||
|
|
||||||
try:
|
with waflib.Node.pickle_lock:
|
||||||
waflib.Node.pickle_lock.acquire()
|
|
||||||
waflib.Node.Nod3 = self.node_class
|
waflib.Node.Nod3 = self.node_class
|
||||||
x = Build.cPickle.dumps(data, Build.PROTOCOL)
|
try:
|
||||||
finally:
|
x = Build.cPickle.dumps(data, Build.PROTOCOL)
|
||||||
waflib.Node.pickle_lock.release()
|
except Build.cPickle.PicklingError:
|
||||||
|
root = data['root']
|
||||||
|
for node_deps in data['node_deps'].values():
|
||||||
|
for idx, node in enumerate(node_deps):
|
||||||
|
# there may be more cross-context Node objects to fix,
|
||||||
|
# but this should be the main source
|
||||||
|
node_deps[idx] = root.find_node(node.abspath())
|
||||||
|
x = Build.cPickle.dumps(data, Build.PROTOCOL)
|
||||||
|
|
||||||
Logs.debug('rev_use: storing %s', db)
|
Logs.debug('rev_use: storing %s', db)
|
||||||
Utils.writef(db + '.tmp', x, m='wb')
|
Utils.writef(db + '.tmp', x, m='wb')
|
||||||
|
|
Loading…
Reference in New Issue