From 53ec0e7307b8e58841b38094df20c448426276c3 Mon Sep 17 00:00:00 2001
From: akashk4 <akashk4@illinois.edu>
Date: Wed, 8 Jan 2020 08:44:31 -0600
Subject: [PATCH] Update CMakeList files for HPVM for LLVM-9

---
 hpvm/lib/Transforms/BuildDFG/CMakeLists.txt       | 3 ++-
 hpvm/lib/Transforms/CMakeLists.txt                | 2 +-
 hpvm/lib/Transforms/ClearDFG/CMakeLists.txt       | 3 ++-
 hpvm/lib/Transforms/DFG2LLVM_NVPTX/CMakeLists.txt | 3 ++-
 hpvm/lib/Transforms/DFG2LLVM_SPIR/CMakeLists.txt  | 3 ++-
 hpvm/lib/Transforms/DFG2LLVM_X86/CMakeLists.txt   | 3 ++-
 hpvm/lib/Transforms/GenVISC/CMakeLists.txt        | 3 ++-
 hpvm/lib/Transforms/LocalMem/CMakeLists.txt       | 3 ++-
 8 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/hpvm/lib/Transforms/BuildDFG/CMakeLists.txt b/hpvm/lib/Transforms/BuildDFG/CMakeLists.txt
index 0b1fa4837c..f4c0503e4d 100644
--- a/hpvm/lib/Transforms/BuildDFG/CMakeLists.txt
+++ b/hpvm/lib/Transforms/BuildDFG/CMakeLists.txt
@@ -2,7 +2,8 @@ if(WIN32 OR CYGWIN)
   set(LLVM_LINK_COMPONENTS Core Support)
 endif()
 
-add_llvm_loadable_module( LLVMBuildDFG
+add_llvm_library( LLVMBuildDFG
+  MODULE
   BuildDFG.cpp
 
   DEPENDS
diff --git a/hpvm/lib/Transforms/CMakeLists.txt b/hpvm/lib/Transforms/CMakeLists.txt
index 2983462d1e..8049471a16 100644
--- a/hpvm/lib/Transforms/CMakeLists.txt
+++ b/hpvm/lib/Transforms/CMakeLists.txt
@@ -1,7 +1,7 @@
 add_subdirectory(BuildDFG)
 add_subdirectory(ClearDFG)
 add_subdirectory(DFG2LLVM_NVPTX)
-add_subdirectory(DFG2LLVM_SPIR)
+#add_subdirectory(DFG2LLVM_SPIR)
 add_subdirectory(DFG2LLVM_X86)
 add_subdirectory(GenVISC)
 add_subdirectory(LocalMem)
diff --git a/hpvm/lib/Transforms/ClearDFG/CMakeLists.txt b/hpvm/lib/Transforms/ClearDFG/CMakeLists.txt
index f928c8acda..af1e9b324c 100644
--- a/hpvm/lib/Transforms/ClearDFG/CMakeLists.txt
+++ b/hpvm/lib/Transforms/ClearDFG/CMakeLists.txt
@@ -2,7 +2,8 @@ if(WIN32 OR CYGWIN)
   set(LLVM_LINK_COMPONENTS Core Support)
 endif()
 
-add_llvm_loadable_module( LLVMClearDFG
+add_llvm_library( LLVMClearDFG
+  MODULE
   ClearDFG.cpp
 
   DEPENDS
diff --git a/hpvm/lib/Transforms/DFG2LLVM_NVPTX/CMakeLists.txt b/hpvm/lib/Transforms/DFG2LLVM_NVPTX/CMakeLists.txt
index 430bea7693..ce2d4c80fd 100644
--- a/hpvm/lib/Transforms/DFG2LLVM_NVPTX/CMakeLists.txt
+++ b/hpvm/lib/Transforms/DFG2LLVM_NVPTX/CMakeLists.txt
@@ -2,7 +2,8 @@ if(WIN32 OR CYGWIN)
   set(LLVM_LINK_COMPONENTS Core Support)
 endif()
 
-add_llvm_loadable_module( LLVMDFG2LLVM_NVPTX
+add_llvm_library( LLVMDFG2LLVM_NVPTX
+  MODULE
   DFG2LLVM_NVPTX.cpp
 
   DEPENDS
diff --git a/hpvm/lib/Transforms/DFG2LLVM_SPIR/CMakeLists.txt b/hpvm/lib/Transforms/DFG2LLVM_SPIR/CMakeLists.txt
index 43e2254c79..15d3ab08ad 100644
--- a/hpvm/lib/Transforms/DFG2LLVM_SPIR/CMakeLists.txt
+++ b/hpvm/lib/Transforms/DFG2LLVM_SPIR/CMakeLists.txt
@@ -2,7 +2,8 @@ if(WIN32 OR CYGWIN)
   set(LLVM_LINK_COMPONENTS Core Support)
 endif()
 
-add_llvm_loadable_module( LLVMDFG2LLVM_SPIR
+add_llvm_library( LLVMDFG2LLVM_SPIR
+  MODULE
   DFG2LLVM_SPIR.cpp
 
   DEPENDS
diff --git a/hpvm/lib/Transforms/DFG2LLVM_X86/CMakeLists.txt b/hpvm/lib/Transforms/DFG2LLVM_X86/CMakeLists.txt
index 6a78066c44..b79c6a3bf9 100644
--- a/hpvm/lib/Transforms/DFG2LLVM_X86/CMakeLists.txt
+++ b/hpvm/lib/Transforms/DFG2LLVM_X86/CMakeLists.txt
@@ -2,7 +2,8 @@ if(WIN32 OR CYGWIN)
   set(LLVM_LINK_COMPONENTS Core Support)
 endif()
 
-add_llvm_loadable_module( LLVMDFG2LLVM_X86
+add_llvm_library( LLVMDFG2LLVM_X86
+  MODULE
   DFG2LLVM_X86.cpp
 
   DEPENDS intrinsics_gen
diff --git a/hpvm/lib/Transforms/GenVISC/CMakeLists.txt b/hpvm/lib/Transforms/GenVISC/CMakeLists.txt
index 710e8f2729..ed087f63b4 100644
--- a/hpvm/lib/Transforms/GenVISC/CMakeLists.txt
+++ b/hpvm/lib/Transforms/GenVISC/CMakeLists.txt
@@ -2,7 +2,8 @@ if(WIN32 OR CYGWIN)
   set(LLVM_LINK_COMPONENTS Core Support)
 endif()
 
-add_llvm_loadable_module( LLVMGenVISC
+add_llvm_library( LLVMGenVISC
+  MODULE
   GenVISC.cpp
 
   DEPENDS
diff --git a/hpvm/lib/Transforms/LocalMem/CMakeLists.txt b/hpvm/lib/Transforms/LocalMem/CMakeLists.txt
index fa91332594..d8dd607cee 100644
--- a/hpvm/lib/Transforms/LocalMem/CMakeLists.txt
+++ b/hpvm/lib/Transforms/LocalMem/CMakeLists.txt
@@ -2,7 +2,8 @@ if(WIN32 OR CYGWIN)
   set(LLVM_LINK_COMPONENTS Core Support)
 endif()
 
-add_llvm_loadable_module( LLVMLocalMem
+add_llvm_library( LLVMLocalMem
+  MODULE
   LocalMem.cpp
 
   DEPENDS
-- 
GitLab