[build] move code about DARGs in darg.py