Bug 1329306 - Also clobber the CMakeFiles directory; r=mystor
This directory can include variables for the toolchain path names,
for example, which are different from run to run on Windows TaskCluster
workers.
--- a/build/build-clang/build-clang.py
+++ b/build/build-clang/build-clang.py
@@ -200,16 +200,18 @@ def build_one_stage(cc, cxx, ld, ar, ran
build_dir = stage_dir + "/build"
inst_dir = stage_dir + "/clang"
# If CMake has already been run, it may have been run with different
# arguments, so we need to re-run it. Make sure the cached copy of the
# previous CMake run is cleared before running it again.
if os.path.exists(build_dir + "/CMakeCache.txt"):
os.remove(build_dir + "/CMakeCache.txt")
+ if os.path.exists(build_dir + "/CMakeFiles"):
+ shutil.rmtree(build_dir + "/CMakeFiles")
# cmake doesn't deal well with backslashes in paths.
def slashify_path(path):
return path.replace('\\', '/')
cmake_args = ["-GNinja",
"-DCMAKE_C_COMPILER=%s" % slashify_path(cc[0]),
"-DCMAKE_CXX_COMPILER=%s" % slashify_path(cxx[0]),