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

Set build target in util/build... scripts. #1860

Merged
merged 2 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion utils/build-llvm-local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
# <llvm dir> - optional, default is 'llvm'
# <build dir> - optional, default is 'build' (for llvm/build)
# <install dir> - optional, default is 'install' (for llvm/install)
# <target> - optional, default is 'X86'
#
##===----------------------------------------------------------------------===##

LLVM_DIR=${1:-"llvm"}
BUILD_DIR=${2:-"build"}
INSTALL_DIR=${3:-"install"}
BUILD_TARGET=${4:-"X86"}

mkdir -p $LLVM_DIR/$BUILD_DIR
mkdir -p $LLVM_DIR/$INSTALL_DIR
Expand All @@ -44,7 +46,7 @@ CMAKE_CONFIGS="\
-DMLIR_ENABLE_BINDINGS_PYTHON=ON \
-DCMAKE_INSTALL_PREFIX=../$INSTALL_DIR \
-DLLVM_ENABLE_PROJECTS=mlir \
-DLLVM_TARGETS_TO_BUILD:STRING=X86;ARM;AArch64 \
-DLLVM_TARGETS_TO_BUILD:STRING=$BUILD_TARGET \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_PLATFORM_NO_VERSIONED_SONAME=ON \
-DCMAKE_VISIBILITY_INLINES_HIDDEN=ON \
Expand Down
6 changes: 4 additions & 2 deletions utils/build-mlir-aie.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#
# <build dir> - optional, mlir-aie/build dir name, default is 'build'
# <install dir> - optional, mlir-aie/install dir name, default is 'install'
# <target> - optional, target to build for, default is 'x86_64'
#
##===----------------------------------------------------------------------===##

Expand All @@ -31,6 +32,7 @@ echo "LLVM BUILD DIR: $LLVM_BUILD_DIR"

BUILD_DIR=${2:-"build"}
INSTALL_DIR=${3:-"install"}
BUILD_TARGET=${4:-"x86_64"}
LLVM_ENABLE_RTTI=${LLVM_ENABLE_RTTI:OFF}

mkdir -p $BUILD_DIR
Expand All @@ -52,9 +54,9 @@ CMAKE_CONFIGS="\
-DCMAKE_CXX_VISIBILITY_PRESET=hidden \
-DLLVM_ENABLE_ASSERTIONS=ON \
-DLLVM_ENABLE_RTTI=$LLVM_ENABLE_RTTI \
-DAIE_RUNTIME_TARGETS=x86_64;aarch64 \
-DAIE_RUNTIME_TARGETS=$BUILD_TARGET \
-DAIE_ENABLE_PYTHON_PASSES=OFF \
-DAIE_RUNTIME_TEST_TARGET=aarch64"
-DAIE_RUNTIME_TEST_TARGET=$BUILD_TARGET"

if [ -x "$(command -v lld)" ]; then
CMAKE_CONFIGS="${CMAKE_CONFIGS} -DLLVM_USE_LINKER=lld"
Expand Down
Loading