Add support for incremental builds.

Change-Id: Id23e9d7878994f4b98a460e0df64e54f15d19dc6