diff --git a/build_openroad.sh b/build_openroad.sh index 74303aa69e..e93cade290 100755 --- a/build_openroad.sh +++ b/build_openroad.sh @@ -265,7 +265,24 @@ __local_build() if [ -z "${SKIP_OPENROAD+x}" ]; then echo "[INFO FLW-0018] Compiling OpenROAD." - eval ${NICE} ./tools/OpenROAD/etc/Build.sh -dir="$DIR/tools/OpenROAD/build" -threads=${PROC} -cmake=\'${OPENROAD_APP_ARGS}\' + if [ -f "${DIR}/openroad_deps_prefixes.txt" ]; then + DEPS_PREFIX_ARG="${DIR}/openroad_deps_prefixes.txt" + elif [ -f "${DIR}/tools/OpenROAD/etc/openroad_deps_prefixes.txt" ]; then + DEPS_PREFIX_ARG="${DIR}/tools/OpenROAD/etc/openroad_deps_prefixes.txt" + elif [ -f /etc/openroad_deps_prefixes.txt ]; then + DEPS_PREFIX_ARG="/etc/openroad_deps_prefixes.txt" + else + DEPS_PREFIX_ARG="" + fi + if [[ -n "${DEPS_PREFIX_ARG}" ]]; then + echo "[INFO FLW-0029] Found OpenROAD dependencies prefixes file: '${DEPS_PREFIX_ARG}'." + DEPS_PREFIX_ARG="-deps-prefixes-file=${DEPS_PREFIX_ARG}" + fi + eval ${NICE} ./tools/OpenROAD/etc/Build.sh \ + -dir="$DIR/tools/OpenROAD/build" \ + -threads=${PROC} \ + -cmake=\'${OPENROAD_APP_ARGS}\' \ + ${DEPS_PREFIX_ARG} ${NICE} cmake --build tools/OpenROAD/build --target install -j "${PROC}" fi diff --git a/docker/Dockerfile.dev b/docker/Dockerfile.dev index 2abeb09cdb..288d4ef709 100644 --- a/docker/Dockerfile.dev +++ b/docker/Dockerfile.dev @@ -28,7 +28,7 @@ RUN mkdir -p /usr/local/bin/wrapped-cc && \ ENV PATH="/usr/local/bin/wrapped-cc:$PATH" -RUN ./DependencyInstaller.sh -all $options $constantBuildDir \ +RUN ./DependencyInstaller.sh -all $options $constantBuildDir -save-deps-prefixes=/etc/openroad_deps_prefixes.txt \ && rm -rf /tmp/installer /tmp/* /var/tmp/* /var/lib/apt/lists/* ARG fromImage diff --git a/etc/DependencyInstaller.sh b/etc/DependencyInstaller.sh index 6097a39696..cb2a5d76d9 100755 --- a/etc/DependencyInstaller.sh +++ b/etc/DependencyInstaller.sh @@ -368,6 +368,9 @@ while [ "$#" -gt 0 ]; do CI="yes" OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} -save-deps-prefixes=/etc/openroad_deps_prefixes.txt" ;; + -save-deps-prefixes=*) + OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} $1" + ;; -yosys-ver=*) YOSYS_VER=${1#*=} ;;