Skip to content

Commit e46a2f1

Browse files
committed
build PCH in a unique temporary directory
1 parent af42ccf commit e46a2f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cling/src/etc/dictpch/makepch.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def makepch():
109109
alllinkdefsFilename.replace("\\","/")
110110

111111
rootclingExe = os.path.join(rootdir,"bin","rootcling")
112-
tmpdir = tempfile.gettempdir()
112+
tmpdir = tempfile.mkdtemp()
113113
outf = os.path.join(tmpdir, "allDict.cxx")
114114
command = [rootclingExe,
115115
rootbuildFlag,
@@ -143,6 +143,7 @@ def makepch():
143143
if ret == 0:
144144
shutil.move(os.path.join(tmpdir, "allDict_rdict.pch"), pchFileName)
145145
os.unlink(outf)
146+
shutil.rmtree(tmpdir)
146147

147148
return ret
148149

0 commit comments

Comments
 (0)