Also, resolve CMake build problems on macOS: Pass CMAKE_OSX_SYSROOT as an environment variable SDKROOT when buildind the arch_flags executable.