@@ -74,6 +74,7 @@ OR_TOOLS_VERSION_SMALL="${OR_TOOLS_VERSION_BIG}.6206"
7474EQUIVALENCE_DEPS=" no"
7575INSTALL_BAZEL=" no"
7676INSTALL_BAZEL_DEV=" no"
77+ NO_GUI=" no"
7778BAZELISK_VERSION=" 1.28.1"
7879BAZELISK_CHECKSUM_AMD64=" 2dc74b7ad6bdd6b6b08f6802d14fc1fd"
7980BAZELISK_CHECKSUM_ARM64=" 94415d08ed2f86a49375f25a7f2f9cca"
@@ -820,18 +821,20 @@ _install_bazel() {
820821 chmod +x bazelisk
821822 _execute " Installing bazelisk..." mv bazelisk " ${bazel_prefix} /bin/bazelisk"
822823 )
823- # Install xcb libraries needed for GUI support with Bazel builds
824- if _command_exists " apt-get" ; then
825- _execute " Installing xcb libraries for GUI support..." \
826- apt-get -y install --no-install-recommends \
827- libxcb1-dev libxcb-util-dev libxcb-icccm4-dev libxcb-image0-dev \
828- libxcb-keysyms1-dev libxcb-randr0-dev libxcb-render-util0-dev \
829- libxcb-xinerama0-dev libxcb-xkb-dev
830- elif _command_exists " yum" ; then
831- _execute " Installing xcb libraries for GUI support..." \
832- yum install -y \
833- libxcb-devel xcb-util-devel xcb-util-image-devel \
834- xcb-util-keysyms-devel xcb-util-renderutil-devel xcb-util-wm-devel
824+ if [[ " ${NO_GUI} " != " yes" ]]; then
825+ # Install xcb libraries needed for GUI support with Bazel builds
826+ if _command_exists " apt-get" ; then
827+ _execute " Installing xcb libraries for GUI support..." \
828+ apt-get -y install --no-install-recommends \
829+ libxcb1-dev libxcb-util-dev libxcb-icccm4-dev libxcb-image0-dev \
830+ libxcb-keysyms1-dev libxcb-randr0-dev libxcb-render-util0-dev \
831+ libxcb-xinerama0-dev libxcb-xkb-dev
832+ elif _command_exists " yum" ; then
833+ _execute " Installing xcb libraries for GUI support..." \
834+ yum install -y \
835+ libxcb-devel xcb-util-devel xcb-util-image-devel \
836+ xcb-util-keysyms-devel xcb-util-renderutil-devel xcb-util-wm-devel
837+ fi
835838 fi
836839 fi
837840 INSTALL_SUMMARY+=(" Bazel: system=none, required=latest, status=installed" )
@@ -1134,6 +1137,7 @@ Options:
11341137 -eqy Install equivalence dependencies (yosys, eqy, sby).
11351138 -bazel Download and install bazel (via bazelisk).
11361139 -bazel-dev Download and install bazel developer tools (buildifier, etc.).
1140+ -no-gui Skip GUI-only dependencies (e.g. xcb libraries) when used with -bazel.
11371141 -prefix=DIR Install common dependencies in a user-specified directory.
11381142 -local Install common dependencies in \$ {HOME}/.local.
11391143 -ci Install dependencies required for CI.
@@ -1161,6 +1165,7 @@ main() {
11611165 -eqy) EQUIVALENCE_DEPS=" yes" ;;
11621166 -bazel) INSTALL_BAZEL=" yes" ;;
11631167 -bazel-dev) INSTALL_BAZEL_DEV=" yes" ;;
1168+ -no-gui) NO_GUI=" yes" ;;
11641169 -ci) CI=" yes" ;;
11651170 -verbose) VERBOSE_MODE=" yes" ;;
11661171 -local)
0 commit comments