@@ -376,19 +376,27 @@ function REALLY_PIN_CC {
376376 cargo update -p cc --precise " 1.0.79" --verbose
377377 ( RUSTC_BOOTSTRAP=1 cargo build --features=std -v --release --target x86_64-apple-darwin -Zbuild-std=std,panic_abort > /dev/null 2>&1 ) || echo -n
378378 ( RUSTC_BOOTSTRAP=1 cargo build --features=std -v --release --target aarch64-apple-darwin -Zbuild-std=std,panic_abort > /dev/null 2>&1 ) || echo -n
379+ pushd ../deterministic-build-wrappers/compiler-builtins-dummy
380+ cargo build > /dev/null 2>&1 || echo -n
381+ popd
379382 # Sadly, std also depends on cc, and we can't pin it in that tree
380383 # directly. Instead, we have to delete the file out of the cargo
381384 # registry and build --offline to avoid it using the latest version.
382385 NEW_CC_DEP=" $CARGO_HOME "
383386 [ " $NEW_CC_DEP " = " " ] && NEW_CC_DEP=" $HOME "
384- [ -d " $NEW_CC_DEP /.cargo/registry/cache/" github.com-* ] && CARGO_REGISTRY_CACHE=" $NEW_CC_DEP /.cargo/registry/cache/" github.com-*
385- [ -d " $NEW_CC_DEP /.cargo/registry/cache/" index.crates.io-* ] && CARGO_REGISTRY_CACHE=" $NEW_CC_DEP /.cargo/registry/cache/" index.crates.io-*
387+ [ -d " $NEW_CC_DEP /.cargo/registry/cache/" github.com-* ] && CARGO_REGISTRY_CACHE=" $( echo " $ NEW_CC_DEP /.cargo/registry/cache/" github.com-* ) "
388+ [ -d " $NEW_CC_DEP /.cargo/registry/cache/" index.crates.io-* ] && CARGO_REGISTRY_CACHE=" $( echo " $ NEW_CC_DEP /.cargo/registry/cache/" index.crates.io-* ) "
386389 if [ -d " $CARGO_REGISTRY_CACHE " ]; then
390+ if [ -f " $CARGO_REGISTRY_CACHE /compiler_builtins-0.1.109.crate" ]; then
391+ mv " $CARGO_REGISTRY_CACHE /compiler_builtins-0.1.109.crate" ./
392+ fi
387393 if [ -f " $CARGO_REGISTRY_CACHE /cc-1.0.79.crate" ]; then
388394 mv " $CARGO_REGISTRY_CACHE /cc-1.0.79.crate" ./
389395 fi
390- rm -f " $CARGO_REGISTRY_CACHE /" * / cc-* .crate
396+ rm -f " $CARGO_REGISTRY_CACHE /" cc-* .crate
391397 [ -f ./cc-1.0.79.crate ] && mv ./cc-1.0.79.crate " $CARGO_REGISTRY_CACHE /"
398+ rm -f " $CARGO_REGISTRY_CACHE /" compiler_builtins-0.1.11* .crate
399+ [ -f ./compiler_builtins-0.1.109.crate ] && mv ./compiler_builtins-0.1.109.crate " $CARGO_REGISTRY_CACHE /"
392400 else
393401 echo " Couldn't find cargo cache, build-std builds are likely to fail!"
394402 fi
0 commit comments