From 69f9e7bae8a88c61452b7007b0a04773513593ba Mon Sep 17 00:00:00 2001 From: Tiziano Santoro Date: Tue, 9 Jun 2020 10:45:24 +0100 Subject: [PATCH] Pass `--remap-path-prefix` to cargo This is meant to reduce nondeterminism across machines or docker vs host, but it does not seem to fully solve the problem yet (it does remove some paths from the resulting binary, so I think it is necessary, but not sufficient). Ref #865 --- scripts/common | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/common b/scripts/common index 47bcbbc7383..db793ae407a 100644 --- a/scripts/common +++ b/scripts/common @@ -10,6 +10,9 @@ set -o pipefail # https://docs.rs/env_logger export RUST_LOG="${RUST_LOG:-info}" +# Reduce build nondeterminism by remapping paths so that they don't include local segments. +export RUSTFLAGS="--remap-path-prefix=$PWD=/ ${RUSTFLAGS:-}" + # See https://pantheon.corp.google.com/gcr/images/oak-ci/GLOBAL/oak readonly DOCKER_IMAGE_NAME='gcr.io/oak-ci/oak' readonly SERVER_DOCKER_IMAGE_NAME='gcr.io/oak-ci/oak-server'