Skip to content
Permalink
Browse files

CMake: Initial LLVM 10.0 support

  • Loading branch information
Michal Babej
Michal Babej committed Sep 16, 2019
1 parent 8962942 commit b834bb2221881491b2671dca18473e87450d5e34
Showing with 24 additions and 1 deletion.
  1. +9 −1 cmake/LLVM.cmake
  2. +2 −0 config.h.in.cmake
  3. +9 −0 include/_kernel.h
  4. +4 −0 include/pocl.h
@@ -37,6 +37,7 @@ else()
# search for any version
find_program(LLVM_CONFIG
NAMES
"llvm-config-mp-10.0" "llvm-config-10" "llvm-config100"
"llvm-config-mp-9.0" "llvm-config-9" "llvm-config90"
"llvm-config-mp-8.0" "llvm-config-8" "llvm-config80"
"llvm-config-mp-7.0" "llvm-config-7" "llvm-config70"
@@ -160,20 +161,27 @@ if(LLVM_VERSION MATCHES "^6[.]0")
set(LLVM_OLDER_THAN_7_0 1)
set(LLVM_OLDER_THAN_8_0 1)
set(LLVM_OLDER_THAN_9_0 1)
set(LLVM_OLDER_THAN_10_0 1)
elseif(LLVM_VERSION MATCHES "^7[.]")
set(LLVM_MAJOR 7)
set(LLVM_7_0 1)
set(LLVM_OLDER_THAN_8_0 1)
set(LLVM_OLDER_THAN_9_0 1)
set(LLVM_OLDER_THAN_10_0 1)
elseif(LLVM_VERSION MATCHES "^8[.]")
set(LLVM_MAJOR 8)
set(LLVM_8_0 1)
set(LLVM_OLDER_THAN_9_0 1)
set(LLVM_OLDER_THAN_10_0 1)
elseif(LLVM_VERSION MATCHES "^9[.]")
set(LLVM_MAJOR 9)
set(LLVM_9_0 1)
set(LLVM_OLDER_THAN_10_0 1)
elseif(LLVM_VERSION MATCHES "^10[.]")
set(LLVM_MAJOR 10)
set(LLVM_10_0 1)
else()
message(FATAL_ERROR "LLVM version between 6.0 and 9.0 required, found: ${LLVM_VERSION}")
message(FATAL_ERROR "LLVM version between 6.0 and 10.0 required, found: ${LLVM_VERSION}")
endif()

#############################################################
@@ -148,6 +148,8 @@

#cmakedefine LLVM_9_0

#cmakedefine LLVM_10_0

#cmakedefine LLVM_BUILD_MODE_DEBUG

#ifndef LLVM_VERSION
@@ -138,12 +138,20 @@
# undef LLVM_9_0
# define LLVM_9_0

#elif (__clang_major__ == 10)

# undef LLVM_10_0
# define LLVM_10_0

#else

#error Unsupported Clang/LLVM version.

#endif

#ifndef LLVM_10_0
#define LLVM_OLDER_THAN_10_0 1

#ifndef LLVM_9_0
#define LLVM_OLDER_THAN_9_0 1

@@ -160,6 +168,7 @@
#endif
#endif
#endif
#endif

/****************************************************************************/

@@ -369,6 +369,9 @@ struct _cl_command_node
cl_int ready;
};

#ifndef LLVM_10_0
#define LLVM_OLDER_THAN_10_0 1

#ifndef LLVM_9_0
#define LLVM_OLDER_THAN_9_0 1

@@ -385,5 +388,6 @@ struct _cl_command_node
#endif
#endif
#endif
#endif

#endif /* POCL_H */

0 comments on commit b834bb2

Please sign in to comment.
You can’t perform that action at this time.