Debugging support: fix compiler wrapper log on Mac OS (#20333)
This fixes a logging error observed on macOS 11.0.1 (Big Sur). When performing a Spack install in debugging mode (e.g. `spack -d install py-scipy`) Spack is supposed to write a log of compiler wrapper command line invocations to the current working directory. Due to a regression error introduced by #18205, these files were no-longer generated, and Spack was printing errors such as "No such file or directory: None/." This is because the log file directory gets set from `spack.main.spack_working_dir`, but that variable is not set in the spawned process. This PR ensures that the working directory (at the time of the "spack install" invocation) is persisted to the subprocess.
This commit is contained in:
parent
0924b20984
commit
cf37e9276d
@ -69,10 +69,12 @@ def __init__(self, pkg):
|
||||
self.serialized_pkg = serialize(pkg)
|
||||
else:
|
||||
self.pkg = pkg
|
||||
self.spack_working_dir = spack.main.spack_working_dir
|
||||
self.test_state = TestState()
|
||||
|
||||
def restore(self):
|
||||
self.test_state.restore()
|
||||
spack.main.spack_working_dir = self.spack_working_dir
|
||||
if _serialize:
|
||||
return pickle.load(self.serialized_pkg)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user