Yii uses PDO (PHP Data Objects) to handle database access. Both DAO (using query builder) and AR (using db criteria) rely on PDO. And the differences between DBMSs (e.g. MySQL and SQLite) are handled in the level of PDO … to a certain degree. It is possible to write a db-specific code using PDO (and using DAO or AR).
As a practical consequence, I think there’s not so much difference between DAO and AR regarding this. If we avoid db-specific SQL syntaxes in our code, it will run on any DBMS that supports PDO.