[build] rules condition rewriting update