[PATCH] D99794: libclc: Add -cl-no-stdinc to clang flags on clang >=13
Dave Airlie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 14 17:45:00 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGea469b08b847: libclc: Add -cl-no-stdinc to clang flags on clang >=13 (authored by jvesely, committed by airlied).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99794/new/
https://reviews.llvm.org/D99794
Files:
libclc/CMakeLists.txt
Index: libclc/CMakeLists.txt
===================================================================
--- libclc/CMakeLists.txt
+++ libclc/CMakeLists.txt
@@ -124,7 +124,6 @@
set( CMAKE_LLAsm_PREPROCESSOR ${LLVM_CLANG} )
set( CMAKE_LLAsm_COMPILER ${LLVM_AS} )
set( CMAKE_LLAsm_ARCHIVE ${LLVM_LINK} )
-enable_language( CLC LLAsm )
# Construct LLVM version define
string( REPLACE "." ";" LLVM_VERSION_LIST ${LLVM_VERSION} )
@@ -132,6 +131,15 @@
list( GET LLVM_VERSION_LIST 1 LLVM_MINOR )
set( LLVM_VERSION_DEFINE "-DHAVE_LLVM=0x${LLVM_MAJOR}0${LLVM_MINOR}" )
+
+# LLVM 13 enables standard includes by default
+if( ${LLVM_VERSION} VERSION_GREATER "12.99.99" )
+ set( CMAKE_LLAsm_FLAGS ${CMAKE_LLAsm_FLAGS} -cl-no-stdinc )
+ set( CMAKE_CLC_FLAGS ${CMAKE_CLC_FLAGS} -cl-no-stdinc )
+endif()
+
+enable_language( CLC LLAsm )
+
# This needs to be set before any target that needs it
link_directories( ${LLVM_LIBDIR} )
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99794.358793.patch
Type: text/x-patch
Size: 925 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210715/49ed962d/attachment.bin>
More information about the llvm-commits
mailing list