handle build constraints

Change-Id: I47b5cbdf1d73006f4876d10dbee8a32211ed6d38