зеркало из https://github.com/microsoft/clang-1.git
clang: Derive version name from LLVM unless specified explicitly. This means
clang is now clang 2.8. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106914 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
4d912b24b3
Коммит
c4b8e923a1
|
@ -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 @@ if( NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR )
|
|||
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
|
||||
|
|
1
VER
1
VER
|
@ -1 +0,0 @@
|
|||
2.0
|
|
@ -13,7 +13,11 @@ include $(CLANG_LEVEL)/Makefile
|
|||
|
||||
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 @@ $(ObjDir)/arm_neon.inc.tmp : arm_neon.td $(TBLGEN) $(ObjDir)/.dir
|
|||
$(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" \
|
||||
|
|
|
@ -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
|
||||
//
|
||||
|
|
Загрузка…
Ссылка в новой задаче