[PATCH] D23606: [LLVM] [cmake] Ensure proper -I along with -include on SunOS, #29013

Michał Górny via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 17 06:25:45 PDT 2016


mgorny created this revision.
mgorny added a reviewer: EricWF.
mgorny added a subscriber: llvm-commits.

As described on the bug, the '-include' flag added to C++ flags on SunOS gets propagated to subprojects such as libc++ while they do not have matching include directories enabled. This simple patch adds an -I flag along with the -include to ensure that the compiler is able to find the requested include.

Bug: https://llvm.org/bugs/show_bug.cgi?id=29013

https://reviews.llvm.org/D23606

Files:
  CMakeLists.txt

Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -713,7 +713,7 @@
 endif(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
 
 if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
-   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include llvm/Support/Solaris.h")
+   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${CMAKE_SOURCE_DIR}/include -include llvm/Support/Solaris.h")
 endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
 
 # Make sure we don't get -rdynamic in every binary. For those that need it,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23606.68341.patch
Type: text/x-patch
Size: 561 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160817/6ec825ed/attachment.bin>


More information about the llvm-commits mailing list