r257827 - [CMake] Set SVN_REVISION if CLANG_APPEND_VC_REV=On

Chris Bieneman via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 15 09:55:16 PST 2016


Thanks for the heads up. It looks like that module is was excluded from the LLVM install. I’ve changed that in LLVM r257909. That change should resolve your build issue. Please let me know if you continue having problems.

Thanks,
-Chris

> On Jan 15, 2016, at 5:18 AM, Daniel Sanders <Daniel.Sanders at imgtec.com> wrote:
> 
> Hi Chris,
> 
> This doesn't seem to work when building clang separately from llvm. LLVMLinux fails to build clang with:
> 	CMake Error at CMakeLists.txt:104 (include):
> 	  include could not find load file:
> 	
> 	    VersionFromVCS
> 
> 	CMake Error at CMakeLists.txt:222 (add_version_info_from_vcs):
> 	  Unknown CMake command "add_version_info_from_vcs".
> See http://buildbot.llvm.linuxfoundation.org/builders/13_malta/builds/383/steps/shell_3/logs/stdio for the full log.
> 
> I've added a patch to llvmlinux to work around the problem for now http://git.linuxfoundation.org/?p=llvmlinux.git;a=blob;f=toolchain/clang/patches/clang/workaround-versionfromvcsbug.patch;h=848a096df37b1255575650680a266234f5d4936e;hb=e0c4c72c5a008006dc230db748ea69e0d1518daf.
> Should we make that change to clang or fix it another way?
> 
>> -----Original Message-----
>> From: cfe-commits [mailto:cfe-commits-bounces at lists.llvm.org] On Behalf
>> Of Chris Bieneman via cfe-commits
>> Sent: 14 January 2016 22:45
>> To: cfe-commits at lists.llvm.org
>> Subject: r257827 - [CMake] Set SVN_REVISION if
>> CLANG_APPEND_VC_REV=On
>> 
>> Author: cbieneman
>> Date: Thu Jan 14 16:45:12 2016
>> New Revision: 257827
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=257827&view=rev
>> Log:
>> [CMake] Set SVN_REVISION if CLANG_APPEND_VC_REV=On
>> 
>> This matches autoconf's ability to put clang revisions in the clang --version
>> spew.
>> 
>> Modified:
>>    cfe/trunk/CMakeLists.txt
>> 
>> Modified: cfe/trunk/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-
>> project/cfe/trunk/CMakeLists.txt?rev=257827&r1=257826&r2=257827&view
>> =diff
>> ==========================================================
>> ====================
>> --- cfe/trunk/CMakeLists.txt (original)
>> +++ cfe/trunk/CMakeLists.txt Thu Jan 14 16:45:12 2016
>> @@ -101,6 +101,7 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR
>>   include(AddLLVM)
>>   include(TableGen)
>>   include(HandleLLVMOptions)
>> +  include(VersionFromVCS)
>> 
>>   set(PACKAGE_VERSION "${LLVM_PACKAGE_VERSION}")
>> 
>> @@ -213,6 +214,18 @@ if(CLANG_REPOSITORY_STRING)
>>   add_definitions(-
>> DCLANG_REPOSITORY_STRING="${CLANG_REPOSITORY_STRING}")
>> endif()
>> 
>> +option(CLANG_APPEND_VC_REV
>> +  "Append the version control system revision id to clang version spew"
>> OFF)
>> +
>> +if(NOT SVN_REVISION)
>> +  # This macro will set SVN_REVISION in the parent scope
>> +  add_version_info_from_vcs(VERSION_VAR)
>> +endif()
>> +
>> +if(SVN_REVISION)
>> +  add_definitions(-DSVN_REVISION="${SVN_REVISION}")
>> +endif()
>> +
>> set(CLANG_VENDOR_UTI "org.llvm.clang" CACHE STRING
>>   "Vendor-specific uti.")
>> 
>> 
>> 
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits



More information about the cfe-commits mailing list