Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canonicalize the install and build directory #329

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions utils/build-mlir-air.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@
#set -x

##===- utils/build-mlir-air.sh - Build mlir-air --*- Script -*-===##
#
#
# Copyright (C) 2022, Advanced Micro Devices, Inc.
# SPDX-License-Identifier: MIT

#
#
##===----------------------------------------------------------------------===##
#
# This script build mlir-air given the <sysroot dir>, <llvm dir>,
# This script build mlir-air given the <sysroot dir>, <llvm dir>,
# <cmakeModules dir>, and <mlir-aie dir>. Assuming they are all in the same
# subfolder, it would look like:
#
# build-mlir-air.sh <sysroot dir> <llvm dir> <cmakeModules dir> <mlir-aie dir>
# <build dir> <install dir>
#
# e.g. build-mlir-air.sh /scratch/vck190_air_sysroot /scratch/llvm
# e.g. build-mlir-air.sh /scratch/vck190_air_sysroot /scratch/llvm
# /scratch/cmakeModules/cmakeModulesXilinx /scratch/mlir-aie build install
#
# <sysroot dir> - sysroot
Expand All @@ -39,8 +39,8 @@ LLVM_DIR=`realpath $2`
CMAKEMODULES_DIR=`realpath $3`
MLIR_AIE_DIR=`realpath $4`

BUILD_DIR=${5:-"build"}
INSTALL_DIR=${6:-"install"}
BUILD_DIR=`realpath ${5:-"build"}`
INSTALL_DIR=`realpath ${6:-"install"}`

mkdir -p $BUILD_DIR
mkdir -p $INSTALL_DIR
Expand All @@ -52,7 +52,7 @@ cmake .. \
-GNinja \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_INSTALL_PREFIX="../${INSTALL_DIR}" \
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
-DArch=arm64 \
-DgccVer=10.2.0 \
-DCMAKE_USE_TOOLCHAIN=FALSE \
Expand All @@ -64,7 +64,7 @@ cmake .. \
-Dpybind11_DIR=${PYTHON_ROOT}/pybind11/share/cmake/pybind11 \
-DBUILD_SHARED_LIBS=OFF \
-DLLVM_USE_LINKER=lld \
-DCMAKE_MODULE_PATH=${CMAKEMODULES_DIR}/ \
-DCMAKE_MODULE_PATH=${CMAKEMODULES_DIR} \
|& tee cmake.log

ninja |& tee ninja.log
Expand Down
Loading