The TARGET_ARCH cmake variable is used to specify the host OS, which if unspecified defaults to the same as the build OS. So to crosscompile aws-sdk-cpp to another OS, the TARGET_ARCH variable must be specified. Example hydra failure: https://hydra.nixos.org/build/149290553/nixlog/3