EXTRA_ENV_TARGET=$(echo "${EXTRA_TARGETS[$IDX]}" | sed 's/-/_/g')
export CFLAGS_$EXTRA_ENV_TARGET="$BASE_CFLAGS"
export CC_$EXTRA_ENV_TARGET=${EXTRA_CCS[$IDX]}
- RUSTFLAGS="$BASE_RUSTFLAGS -C embed-bitcode=yes -C lto -C linker=${EXTRA_CCS[$IDX]}" CARGO_PROFILE_RELEASE_LTO=true cargo build $CARGO_BUILD_ARGS -v --release --target "${EXTRA_TARGETS[$IDX]}"
+ EXTRA_RUSTFLAGS=""
+ case "$EXTRA_ENV_TARGET" in
+ "x86_64"*)
+ export CFLAGS_$EXTRA_ENV_TARGET="$BASE_CFLAGS -march=sandybridge -mtune=sandybridge"
+ EXTRA_RUSTFLAGS="-C target-cpu=sandybridge"
+ ;;
+ esac
+ RUSTFLAGS="$BASE_RUSTFLAGS -C embed-bitcode=yes -C lto -C linker=${EXTRA_CCS[$IDX]} $EXTRA_RUSTFLAGS" CARGO_PROFILE_RELEASE_LTO=true cargo build $CARGO_BUILD_ARGS -v --release --target "${EXTRA_TARGETS[$IDX]}"
done
if [ "$CLANGPP" != "" -a "$LLD" != "" ]; then