diff --git a/etc/DependencyInstaller.sh b/etc/DependencyInstaller.sh index 1303b663b5..af335f2437 100755 --- a/etc/DependencyInstaller.sh +++ b/etc/DependencyInstaller.sh @@ -31,6 +31,12 @@ _installORDependencies() { YOSYS_VER=v$(grep 'yosys_ver =' tools/yosys/docs/source/conf.py | awk -F'"' '{print $2}') fi ./tools/OpenROAD/etc/DependencyInstaller.sh ${OR_INSTALLER_ARGS} -yosys-ver="${YOSYS_VER}" + # bazelisk goes to /usr/local in the privileged step, because the -common + # prefix is not on PATH. A bare -bazel installs it and its runtime + # libraries. + if [[ "${buildSystem}" == "bazel" ]] && [[ "${option}" == "base" || "${option}" == "all" ]]; then + ./tools/OpenROAD/etc/DependencyInstaller.sh -bazel + fi } _installPipCommon() { @@ -337,13 +343,23 @@ Usage: $0 [-all|-base|-common] [-] # $0 -base # Installs OpenROAD's dependencies using - # package managers, including Bazel - # (bazelisk). -common must be executed - # in another command. + # package managers. -common must be + # executed in another command. $0 -common # Installs OpenROAD's common dependencies # (-base must be executed in another # command). + $0 -bazel + # Default. Installs Bazel (bazelisk) and + # its runtime libraries with -base or + # -all. build_openroad.sh builds + # OpenROAD with Bazel. + $0 -cmake + # Skips Bazel and installs only the CMake + # dependencies. Use it to build + # OpenROAD with CMake, e.g. + # build_openroad.sh --openroad-args + # -cmake-build (deprecated upstream). $0 -prefix=DIR # Installs common dependencies in an existing # user-specified directory. Only used @@ -378,6 +394,8 @@ option="none" isLocal="false" constantBuildDir="false" CI="no" +# OpenROAD build system to install dependencies for: bazel or cmake +buildSystem="bazel" # default values, can be overwritten by cmdline args while [ "$#" -gt 0 ]; do @@ -403,6 +421,12 @@ while [ "$#" -gt 0 ]; do fi option="common" ;; + -bazel) + buildSystem="bazel" + ;; + -cmake) + buildSystem="cmake" + ;; -local) OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} -local" ;; @@ -441,13 +465,10 @@ if [[ "${option}" == "none" ]]; then _help fi -OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} -${option}" -# build_openroad.sh builds OpenROAD with Bazel, so bazelisk and its runtime -# libraries are base dependencies. They need root, and -common may run -# unprivileged, so they ride along with -base only. -if [[ "${option}" == "base" || "${option}" == "all" ]]; then - OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} -bazel" -fi +# Yosys, EQY and kepler-formal need the OpenROAD CMake dependency set for +# both build systems. build_openroad.sh builds OpenROAD with Bazel by default, +# so _installORDependencies also installs the Bazel set unless -cmake is given. +OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} -cmake -${option}" platform="$(uname -s)" case "${platform}" in diff --git a/tools/OpenROAD b/tools/OpenROAD index 91e5f5ff2f..61470341f3 160000 --- a/tools/OpenROAD +++ b/tools/OpenROAD @@ -1 +1 @@ -Subproject commit 91e5f5ff2f198fd130e8915c8ad4408b56987fa4 +Subproject commit 61470341f3d2062514af36de09ab7590ddae06a4