[cfe-commits] r124825 - in /cfe/trunk: CMakeLists.txt include/clang/Config/ include/clang/Config/config.h.cmake lib/Driver/Driver.cpp lib/Frontend/InitHeaderSearch.cpp
Oscar Fuentes
ofv at wanadoo.es
Thu Feb 3 14:48:21 PST 2011
Author: ofv
Date: Thu Feb 3 16:48:20 2011
New Revision: 124825
URL: http://llvm.org/viewvc/llvm-project?rev=124825&view=rev
Log:
Moved here from LLVM Clang's configuration options and related macros.
Added:
cfe/trunk/include/clang/Config/
cfe/trunk/include/clang/Config/config.h.cmake
Modified:
cfe/trunk/CMakeLists.txt
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=124825&r1=124824&r2=124825&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Thu Feb 3 16:48:20 2011
@@ -54,6 +54,12 @@
add_definitions( -D__STDC_CONSTANT_MACROS )
endif()
+set(CLANG_RESOURCE_DIR "" CACHE STRING
+ "Relative directory from the Clang binary to its resource files.")
+
+set(C_INCLUDE_DIRS "" CACHE STRING
+ "Colon separated list of directories clang will search for headers.")
+
set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
@@ -108,6 +114,10 @@
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,-flat_namespace -Wl,-undefined -Wl,suppress")
endif ()
+configure_file(
+ ${CLANG_SOURCE_DIR}/include/clang/Config/config.h.cmake
+ ${CLANG_BINARY_DIR}/include/clang/Config/config.h)
+
macro(add_clang_library name)
llvm_process_sources(srcs ${ARGN})
if(MSVC_IDE OR XCODE)
@@ -186,7 +196,7 @@
PATTERN "*.inc"
)
-add_definitions( -D_GNU_SOURCE )
+add_definitions( -D_GNU_SOURCE -DHAVE_CLANG_CONFIG_H )
option(CLANG_BUILD_EXAMPLES "Build CLANG example programs." OFF)
if(CLANG_BUILD_EXAMPLES)
Added: cfe/trunk/include/clang/Config/config.h.cmake
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Config/config.h.cmake?rev=124825&view=auto
==============================================================================
--- cfe/trunk/include/clang/Config/config.h.cmake (added)
+++ cfe/trunk/include/clang/Config/config.h.cmake Thu Feb 3 16:48:20 2011
@@ -0,0 +1,17 @@
+/* Relative directory for resource files */
+#define CLANG_RESOURCE_DIR "${CLANG_RESOURCE_DIR}"
+
+/* 32 bit multilib directory. */
+#define CXX_INCLUDE_32BIT_DIR "${CXX_INCLUDE_32BIT_DIR}"
+
+/* 64 bit multilib directory. */
+#define CXX_INCLUDE_64BIT_DIR "${CXX_INCLUDE_64BIT_DIR}"
+
+/* Arch the libstdc++ headers. */
+#define CXX_INCLUDE_ARCH "${CXX_INCLUDE_ARCH}"
+
+/* Directory with the libstdc++ headers. */
+#define CXX_INCLUDE_ROOT "${CXX_INCLUDE_ROOT}"
+
+/* Directories clang will search for headers */
+#define C_INCLUDE_DIRS "${C_INCLUDE_DIRS}"
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=124825&r1=124824&r2=124825&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Thu Feb 3 16:48:20 2011
@@ -7,6 +7,10 @@
//
//===----------------------------------------------------------------------===//
+#ifdef HAVE_CLANG_CONFIG_H
+# include "clang/Config/config.h"
+#endif
+
#include "clang/Driver/Driver.h"
#include "clang/Driver/Action.h"
Modified: cfe/trunk/lib/Frontend/InitHeaderSearch.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/InitHeaderSearch.cpp?rev=124825&r1=124824&r2=124825&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/InitHeaderSearch.cpp (original)
+++ cfe/trunk/lib/Frontend/InitHeaderSearch.cpp Thu Feb 3 16:48:20 2011
@@ -11,6 +11,10 @@
//
//===----------------------------------------------------------------------===//
+#ifdef HAVE_CLANG_CONFIG_H
+# include "clang/Config/config.h"
+#endif
+
#include "clang/Frontend/Utils.h"
#include "clang/Basic/FileManager.h"
#include "clang/Basic/LangOptions.h"
More information about the cfe-commits
mailing list