Skip to content

Commit df41dfb

Browse files
authored
Merge pull request #207 from fzou1/remove-repo-name-100
Remove repo name in LLVM IR
2 parents 55e6029 + dc21cab commit df41dfb

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
From b53fd86ffdeacb9b13624bdb110fd25e8c35cb92 Mon Sep 17 00:00:00 2001
2+
From: Feng Zou <[email protected]>
3+
Date: Mon, 19 Oct 2020 14:43:38 +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 1b6519b4b7c..8fd6b23bb34 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+
endif()
43+
endfunction()
44+
--
45+
2.18.1
46+

0 commit comments

Comments
 (0)