1. A computer implemented method of legalizing a circuit layout for manufacturing a circuit, the circuit layout using a plurality of non-uniform grids, the circuit layout comprised of a layout object, the method comprising: generating a set of layout constraints for the layout object based on the plurality of non-uniform grids, the set of layout constraints comprising design rule check constraints and gridding requirements, the gridding requirements being requisites for the layout object to align to one of the plurality of non-uniform grids, the layout object having layout variables to identify a position of the layout object; processing the set of layout constraints to a feasible form for the layout object to be modified to satisfy the set of layout constraints by: assigning Boolean variables to the layout variables, each Boolean variable from the Boolean variables assigned to a corresponding layout variable from the layout variables, determining whether the set of layout constraints is infeasible using the Boolean variables assigned to the layout variables, and responsive to the set of layout constraints determined to be infeasible, (i) identifying an infeasible layout constraint from the set of layout constraints, the infeasible layout constraint causing the set of layout constraints to be infeasible, and (ii) relaxing the identified infeasible layout constraint for the set of layout constraints to be in the feasible form; and generating, by solving the set of layout constraints in the feasible form with a linear program solver, an output circuit layout to provide for manufacture of the circuit.
8. The method of claim 1 , wherein relaxing the infeasible layout constraint comprises: replacing a value of the identified infeasible layout constraint restricting the layout object to be placed to a less restrictive value.