You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2016/04/28 02:09:53 UTC

[26/32] incubator-mynewt-newt git commit: newt tool - Fix deadlock due to deleted header

newt tool - Fix deadlock due to deleted header

The newt tool repeatedly rebuilt the .d file when a header was missing.
Instead, just try to build the source file.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/21ca20a7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/21ca20a7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/21ca20a7

Branch: refs/heads/master
Commit: 21ca20a743ecea846a2e467c49025b03567f5d90
Parents: 9d2dc4a
Author: Christopher Collins <cc...@apache.org>
Authored: Wed Apr 20 15:47:22 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Wed Apr 20 15:47:22 2016 -0700

----------------------------------------------------------------------
 newt/toolchain/deps.go | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/blob/21ca20a7/newt/toolchain/deps.go
----------------------------------------------------------------------
diff --git a/newt/toolchain/deps.go b/newt/toolchain/deps.go
index 814dd3f..a695049 100644
--- a/newt/toolchain/deps.go
+++ b/newt/toolchain/deps.go
@@ -216,14 +216,8 @@ func (tracker *DepTracker) CompileRequired(srcFile string,
 	// Check if any dependencies are newer than the destination object file.
 	for _, dep := range deps {
 		if util.NodeNotExist(dep) {
-			// The dependency has been deleted; the .d file is out of date.
-			// Recreate the dependency file and repeat this entire function.
-			err := tracker.compiler.GenDepsForFile(srcFile)
-			if err != nil {
-				return false, err
-			}
-
-			return tracker.CompileRequired(srcFile, compilerType)
+			// The dependency has been deleted; a rebuild is required.
+			return true, nil
 		} else {
 			depModTime, err = util.FileModificationTime(dep)
 			if err != nil {