[cfe-commits] r106914 - in /cfe/trunk: CMakeLists.txt VER include/clang/Basic/Makefile test/Preprocessor/init.c
Daniel Dunbar
daniel at zuster.org
Fri Jun 25 16:34:47 PDT 2010
Author: ddunbar
Date: Fri Jun 25 18:34:47 2010
New Revision: 106914
URL: http://llvm.org/viewvc/llvm-project?rev=106914&view=rev
Log:
clang: Derive version name from LLVM unless specified explicitly. This means
clang is now clang 2.8.
Removed:
cfe/trunk/VER
Modified:
cfe/trunk/CMakeLists.txt
cfe/trunk/include/clang/Basic/Makefile
cfe/trunk/test/Preprocessor/init.c
Modified: cfe/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CMakeLists.txt?rev=106914&r1=106913&r2=106914&view=diff
==============================================================================
--- cfe/trunk/CMakeLists.txt (original)
+++ cfe/trunk/CMakeLists.txt Fri Jun 25 18:34:47 2010
@@ -1,10 +1,5 @@
# Clang version information
-# Make sure that CMake reconfigures when the version changes.
-configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/VER
- ${CMAKE_CURRENT_BINARY_DIR}/VER)
-
set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
@@ -28,10 +23,9 @@
endif()
endif()
-# Compute the Clang version from the contents of VER
-file(READ ${CMAKE_CURRENT_SOURCE_DIR}/VER CLANG_VERSION_DATA)
+# Compute the Clang version from the LLVM version.
string(REGEX MATCH "[0-9]+\\.[0-9]+(\\.[0-9]+)?" CLANG_VERSION
- ${CLANG_VERSION_DATA})
+ ${PACKAGE_VERSION})
message(STATUS "Clang version: ${CLANG_VERSION}")
string(REGEX REPLACE "([0-9]+)\\.[0-9]+(\\.[0-9]+)?" "\\1" CLANG_VERSION_MAJOR
Removed: cfe/trunk/VER
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/VER?rev=106913&view=auto
==============================================================================
--- cfe/trunk/VER (original)
+++ cfe/trunk/VER (removed)
@@ -1 +0,0 @@
-2.0
Modified: cfe/trunk/include/clang/Basic/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Makefile?rev=106914&r1=106913&r2=106914&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/Makefile (original)
+++ cfe/trunk/include/clang/Basic/Makefile Fri Jun 25 18:34:47 2010
@@ -13,7 +13,11 @@
INPUT_TDS = $(wildcard $(PROJ_SRC_DIR)/Diagnostic*.td)
-CLANG_VERSION := $(shell cat $(PROJ_SRC_DIR)/../../../VER)
+# Compute the Clang version from the LLVM version, unless specified explicitly.
+ifndef CLANG_VERSION
+CLANG_VERSION := $(subst svn,,$(LLVMVersion))
+endif
+
CLANG_VERSION_COMPONENTS := $(subst ., ,$(CLANG_VERSION))
CLANG_VERSION_MAJOR := $(word 1,$(CLANG_VERSION_COMPONENTS))
CLANG_VERSION_MINOR := $(word 2,$(CLANG_VERSION_COMPONENTS))
@@ -41,7 +45,7 @@
$(Echo) "Building Clang arm_neon.inc with tblgen"
$(Verb) $(TableGen) -gen-arm-neon-sema -o $(call SYSPATH, $@) $<
-$(ObjDir)/Version.inc.tmp : Version.inc.in $(PROJ_SRC_DIR)/../../../VER $(ObjDir)/.dir
+$(ObjDir)/Version.inc.tmp : Version.inc.in Makefile $(LLVM_OBJ_ROOT)/Makefile.config $(ObjDir)/.dir
$(Echo) "Updating Clang version info."
$(Verb)sed -e "s#@CLANG_VERSION@#$(CLANG_VERSION)#g" \
-e "s#@CLANG_VERSION_MAJOR@#$(CLANG_VERSION_MAJOR)#g" \
Modified: cfe/trunk/test/Preprocessor/init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Preprocessor/init.c?rev=106914&r1=106913&r2=106914&view=diff
==============================================================================
--- cfe/trunk/test/Preprocessor/init.c (original)
+++ cfe/trunk/test/Preprocessor/init.c Fri Jun 25 18:34:47 2010
@@ -50,9 +50,9 @@
// COMMON:#define __STDC__ 1
// COMMON:#define __VERSION__
// COMMON:#define __clang__ 1
-// COMMON:#define __clang_major__ 2
-// COMMON:#define __clang_minor__ 0
-// COMMON:#define __clang_patchlevel__ 0
+// COMMON:#define __clang_major__ {{[0-9]+}}
+// COMMON:#define __clang_minor__ {{[0-9]+}}
+// COMMON:#define __clang_patchlevel__ {{[0-9]+}}
// COMMON:#define __clang_version__
// COMMON:#define __llvm__ 1
//
More information about the cfe-commits
mailing list