Merge "build: refactor toolchain detection" into integration