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

[llvm] install libLLVM and libMLIR for windows #46

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 0 additions & 3 deletions .github/workflows/build_llvm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ jobs:
build_tools/build_llvm_wasi.sh
else
build_tools/build_llvm.sh
echo "*********************** SMOKE TEST *********************************"
"$LLVM_INSTALL_DIR/bin/mlir-tblgen" --version
echo "*********************** SMOKE TEST *********************************"
fi
ccache -s

Expand Down
25 changes: 10 additions & 15 deletions build_tools/cmake/llvm_cache.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,22 @@ set(LLVM_INCLUDE_TOOLS ON CACHE BOOL "")
set(LLVM_INSTALL_UTILS ON CACHE BOOL "")

set(LLVM_BUILD_LLVM_DYLIB ON CACHE BOOL "")
# All the tools will use libllvm shared library
# (but doesn't work on windows)
if (NOT WIN32)
set(LLVM_LINK_LLVM_DYLIB ON CACHE BOOL "")
set(MLIR_LINK_MLIR_DYLIB ON CACHE BOOL "")
if (WIN32)
set(LLVM_BUILD_LLVM_DYLIB_VIS ON CACHE BOOL "")
endif()
set(LLVM_LINK_LLVM_DYLIB ON CACHE BOOL "")
set(MLIR_LINK_MLIR_DYLIB ON CACHE BOOL "")

# useful things
set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
set(LLVM_ENABLE_WARNINGS ON CACHE BOOL "")
set(LLVM_FORCE_ENABLE_STATS ON CACHE BOOL "")
# because AMD target td files are insane...
set(LLVM_OPTIMIZED_TABLEGEN ON CACHE BOOL "")
# on windows this breaks because mlir/IR/BuiltinLocationAttributes.h.inc
# isn't generated in the right order for mlir-reduce to compile
if (NOT WIN32)
# because AMD target td files are insane...
set(LLVM_OPTIMIZED_TABLEGEN ON CACHE BOOL "")
endif()
set(LLVM_ENABLE_RTTI ON CACHE BOOL "")

# MLIR options
Expand Down Expand Up @@ -117,17 +120,9 @@ set(LLVM_MlirDevelopment_DISTRIBUTION_COMPONENTS
mlir-cmake-exports
mlir-headers
mlir-libraries
mlir-opt
mlir-python-sources
mlir-reduce
mlir-tblgen
mlir-translate
CACHE STRING "")

if (NOT WIN32)
list(APPEND LLVM_MlirDevelopment_DISTRIBUTION_COMPONENTS LLVM MLIR)
endif()

get_cmake_property(_variableNames VARIABLES)
list(SORT _variableNames)
cmake_print_variables(${_variableNames})
Loading