Skip to content

Commit bbf9569

Browse files
authored
Merge pull request The-OpenROAD-Project#3425 from vvbandeira/deps-numthreads
2 parents 74febbb + b16b426 commit bbf9569

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.30.3
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
@@ -322,6 +323,10 @@ while [ "$#" -gt 0 ]; do
322323
OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} $1"
323324
constantBuildDir="true"
324325
;;
326+
-threads=*)
327+
OR_INSTALLER_ARGS="${OR_INSTALLER_ARGS} $1"
328+
numThreads=${1#*=}
329+
;;
325330
*)
326331
echo "unknown option: ${1}" >&2
327332
_help

0 commit comments

Comments
 (0)