only compile overlay when nessecary

Change-Id: Iba5bc28338129b06357d13b43e944ec56fdcb37f
Merge "only compile overlay when nessecary" into cm-11.0