|  | 
|  | 1 | +From ff0a6da84b94c16c4519c649f1f7bed3cdf89bbb Mon Sep 17 00:00:00 2001 | 
|  | 2 | +From: Feng Zou <[email protected] > | 
|  | 3 | +Date: Tue, 20 Oct 2020 11:29:04 +0800 | 
|  | 4 | +Subject: [PATCH] Remove repo name in LLVM IR | 
|  | 5 | + | 
|  | 6 | +--- | 
|  | 7 | + llvm/cmake/modules/VersionFromVCS.cmake | 23 ++++++++++++----------- | 
|  | 8 | + 1 file changed, 12 insertions(+), 11 deletions(-) | 
|  | 9 | + | 
|  | 10 | +diff --git a/llvm/cmake/modules/VersionFromVCS.cmake b/llvm/cmake/modules/VersionFromVCS.cmake | 
|  | 11 | +index 18edbeabe3e..2d965263478 100644 | 
|  | 12 | +--- a/llvm/cmake/modules/VersionFromVCS.cmake | 
|  | 13 | ++++ b/llvm/cmake/modules/VersionFromVCS.cmake | 
|  | 14 | +@@ -33,17 +33,18 @@ function(get_source_info path revision repository) | 
|  | 15 | +       else() | 
|  | 16 | +         set(remote "origin") | 
|  | 17 | +       endif() | 
|  | 18 | +-      execute_process(COMMAND ${GIT_EXECUTABLE} remote get-url ${remote} | 
|  | 19 | +-        WORKING_DIRECTORY ${path} | 
|  | 20 | +-        RESULT_VARIABLE git_result | 
|  | 21 | +-        OUTPUT_VARIABLE git_output | 
|  | 22 | +-        ERROR_QUIET) | 
|  | 23 | +-      if(git_result EQUAL 0) | 
|  | 24 | +-        string(STRIP "${git_output}" git_output) | 
|  | 25 | +-        set(${repository} ${git_output} PARENT_SCOPE) | 
|  | 26 | +-      else() | 
|  | 27 | +-        set(${repository} ${path} PARENT_SCOPE) | 
|  | 28 | +-      endif() | 
|  | 29 | ++      # Do not show repo name in IR | 
|  | 30 | ++      # execute_process(COMMAND ${GIT_EXECUTABLE} remote get-url ${remote} | 
|  | 31 | ++      #   WORKING_DIRECTORY ${path} | 
|  | 32 | ++      #   RESULT_VARIABLE git_result | 
|  | 33 | ++      #   OUTPUT_VARIABLE git_output | 
|  | 34 | ++      #   ERROR_QUIET) | 
|  | 35 | ++      # if(git_result EQUAL 0) | 
|  | 36 | ++      #   string(STRIP "${git_output}" git_output) | 
|  | 37 | ++      #   set(${repository} ${git_output} PARENT_SCOPE) | 
|  | 38 | ++      # else() | 
|  | 39 | ++      #   set(${repository} ${path} PARENT_SCOPE) | 
|  | 40 | ++      # endif() | 
|  | 41 | +     endif() | 
|  | 42 | +   else() | 
|  | 43 | +     message(WARNING "Git not found. Version cannot be determined.") | 
|  | 44 | +--  | 
|  | 45 | +2.18.1 | 
|  | 46 | + | 
0 commit comments