From c5aac6a9deb5ec068afcee33d70e03f27caba115 Mon Sep 17 00:00:00 2001 From: Christian Dietrich <christian.dietrich@informatik.uni-erlangen.de> Date: Thu, 12 Jan 2017 13:23:17 +0100 Subject: [PATCH] inc_rebuild: touch alltypes.h on musl if header changes --- experiments/incremental_rebuild.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/experiments/incremental_rebuild.py b/experiments/incremental_rebuild.py index a21bba5..7c9a948 100755 --- a/experiments/incremental_rebuild.py +++ b/experiments/incremental_rebuild.py @@ -53,8 +53,18 @@ class IncrementalCompilation(Experiment): else: raise RuntimeError("Not a valid project") - def call_make(self, path): - return shell("cd %s; make -j %s", path, str(self.jobs.value)) + def call_make(self, path, cause = ""): + # We specialcase here for musl, since it does not employ + # header dependencies. IRC recommended a make clean approach, + # but currently clang hash does copy object files away. + # touching this file, we result in a reconsideration of all + # sources + if self.project_name() == "musl" and cause.endswith(".h"): + return shell("cd %s; touch obj/include/bits/alltypes.h && make -j %s", path, + str(self.jobs.value)) + + return shell("cd %s; make -j %s", path, + str(self.jobs.value)) def get_sources(self, path): ret = [] @@ -80,7 +90,7 @@ class IncrementalCompilation(Experiment): # Recompile! start_time = time.time() - ret = self.call_make(path) + ret = self.call_make(path, cause) end_time = time.time() # Call the lines that include the full compiler path -- GitLab