Skip to content

Commit 64851f1

Browse files
committed
etc: optioin to set num of threads for DependencyInstaller
Signed-off-by: Vitor Bandeira <[email protected]>
1 parent ad13f2d commit 64851f1

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

etc/DependencyInstaller.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ fi
1212
# package versions
1313
klayoutVersion=0.28.17
1414
verilatorVersion=5.026
15+
numThreads=$(nproc)
1516

1617
_versionCompare() {
1718
local a b IFS=. ; set -f
@@ -54,7 +55,7 @@ _installCommon() {
5455
pushd verilator
5556
autoconf
5657
./configure --prefix "${verilatorPrefix}"
57-
make -j`nproc`
58+
make -j "${numThreads}"
5859
make install
5960
popd
6061
rm -r verilator
@@ -162,9 +163,9 @@ _installUbuntuPackages() {
162163
if [ ! -f ${klayoutPrefix}/klayout ]; then
163164
_installKlayoutDependenciesUbuntuAarch64
164165
echo "Installing KLayout for aarch64 architecture"
165-
git clone https://github.com/KLayout/klayout.git
166+
git clone --depth=1 -b "v${klayoutVersion}" https://github.com/KLayout/klayout.git
166167
cd klayout
167-
./build.sh -bin "${klayoutPrefix}"
168+
./build.sh -bin "${klayoutPrefix}" -option -j "${numThreads}"
168169
else
169170
echo "Klayout is already installed"
170171
fi
@@ -317,6 +318,10 @@ while [ "$#" -gt 0 ]; do
317318
OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} $1"
318319
constantBuildDir="true"
319320
;;
321+
-threads=*)
322+
OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} $1"
323+
numThreads=${1#*=}
324+
;;
320325
*)
321326
echo "unknown option: ${1}" >&2
322327
_help

tools/OpenROAD

Submodule OpenROAD updated 236 files

0 commit comments

Comments
 (0)