I'm building the aarch64-apple-tvos-sim via x.py. It works overall, however I'm looking for the following customizations:
Custom TVOS_DEPLOYMENT_TARGET or -mtvos-simulator-version-min
Build the static libraries only
For [1] I tried setting the CFLAGS_aarch64-apple-tvos-sim=-mtvos-simulator-version-min=17.0 but I'm not sure it had any effect as produced rlib and dylib libraries do not have LC_VERSION set as per otool -l. Cannot figure out how to achieve [2].
I think I was able to force Rust's bootstrap to produce binaries with desired *_DEPLOYMENT_TARGET:
Set the CFLAGS_<triple> and CXXFLAGS_<triple> environment variables to -m<platform>-version-min=<version>
Set the RUSTC_WRAPPER environment variable to custom shell script:
#!/bin/zsh
target_option_idx=${@[(Ie)--target]}
if [[ ${target_option_idx} -ne 0 ]]; then
target_value_idx=$((target_option_idx + 1))
target_value=$@[target_value_idx]
if [[ "${target_value}" = "<triple>" ]]; then
exec /usr/bin/env <platform>_DEPLOYMENT_TARGET=<version> "$@"
fi
fi
exec /usr/bin/env "$@"