merge with upstream, add compile attributes