Skip to content

Commit

Permalink
add build-system support for MLIR
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy authored and simeonschaub committed Aug 11, 2020
1 parent f94a3c5 commit 89dde98
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ USE_POLLY := 0
USE_POLLY_OPENMP := 0 # Enable OpenMP code-generation
USE_POLLY_ACC := 0 # Enable GPU code-generation

# Options to use MLIR
USE_MLIR := 0

# Cross-compile
#XC_HOST := i686-w64-mingw32
#XC_HOST := x86_64-w64-mingw32
Expand Down
12 changes: 12 additions & 0 deletions deps/llvm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ endif
endif
endif

ifeq ($(USE_MLIR),1)
ifeq ($(USE_SYSTEM_LLVM),0)
ifneq ($(LLVM_VER),svn)
$(error USE_MLIR=1 requires LLVM_VER=svn)
endif
endif
endif


# for Monorepo
LLVM_ENABLE_PROJECTS :=
ifeq ($(BUILD_LLVM_CLANG), 1)
Expand All @@ -28,6 +37,9 @@ endif
ifeq ($(BUILD_LLDB), 1)
LLVM_ENABLE_PROJECTS := $(LLVM_ENABLE_PROJECTS);lldb
endif
ifeq ($(USE_MLIR), 1)
LLVM_ENABLE_PROJECTS := $(LLVM_ENABLE_PROJECTS);mlir
endif

include $(SRCDIR)/llvm-options.mk
LLVM_LIB_FILE := libLLVMCodeGen.a
Expand Down

0 comments on commit 89dde98

Please sign in to comment.