forked from LibreService/my_rime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
glog_patch
75 lines (69 loc) · 3.51 KB
/
glog_patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f5c1e55..c181509 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,6 +45,9 @@ option (WITH_THREADS "Enable multithreading support" ON)
option (WITH_TLS "Enable Thread Local Storage (TLS) support" ON)
option (WITH_UNWIND "Enable libunwind support" ON)
+# Reproducible build
+add_definitions(-ffile-prefix-map=${CMAKE_CURRENT_SOURCE_DIR}=.)
+
cmake_dependent_option (WITH_GMOCK "Use Google Mock" ON WITH_GTEST OFF)
set (WITH_FUZZING none CACHE STRING "Fuzzing engine")
diff --git a/src/glog/logging.h.in b/src/glog/logging.h.in
index 26fd371..504237a 100644
--- a/src/glog/logging.h.in
+++ b/src/glog/logging.h.in
@@ -479,9 +479,9 @@ DECLARE_bool(log_utc_time);
#if GOOGLE_STRIP_LOG == 0
#define COMPACT_GOOGLE_LOG_INFO @ac_google_namespace@::LogMessage( \
- __FILE__, __LINE__)
+ __FILE_NAME__, __LINE__)
#define LOG_TO_STRING_INFO(message) @ac_google_namespace@::LogMessage( \
- __FILE__, __LINE__, @ac_google_namespace@::GLOG_INFO, message)
+ __FILE_NAME__, __LINE__, @ac_google_namespace@::GLOG_INFO, message)
#else
#define COMPACT_GOOGLE_LOG_INFO @ac_google_namespace@::NullStream()
#define LOG_TO_STRING_INFO(message) @ac_google_namespace@::NullStream()
@@ -489,9 +489,9 @@ DECLARE_bool(log_utc_time);
#if GOOGLE_STRIP_LOG <= 1
#define COMPACT_GOOGLE_LOG_WARNING @ac_google_namespace@::LogMessage( \
- __FILE__, __LINE__, @ac_google_namespace@::GLOG_WARNING)
+ __FILE_NAME__, __LINE__, @ac_google_namespace@::GLOG_WARNING)
#define LOG_TO_STRING_WARNING(message) @ac_google_namespace@::LogMessage( \
- __FILE__, __LINE__, @ac_google_namespace@::GLOG_WARNING, message)
+ __FILE_NAME__, __LINE__, @ac_google_namespace@::GLOG_WARNING, message)
#else
#define COMPACT_GOOGLE_LOG_WARNING @ac_google_namespace@::NullStream()
#define LOG_TO_STRING_WARNING(message) @ac_google_namespace@::NullStream()
@@ -499,9 +499,9 @@ DECLARE_bool(log_utc_time);
#if GOOGLE_STRIP_LOG <= 2
#define COMPACT_GOOGLE_LOG_ERROR @ac_google_namespace@::LogMessage( \
- __FILE__, __LINE__, @ac_google_namespace@::GLOG_ERROR)
+ __FILE_NAME__, __LINE__, @ac_google_namespace@::GLOG_ERROR)
#define LOG_TO_STRING_ERROR(message) @ac_google_namespace@::LogMessage( \
- __FILE__, __LINE__, @ac_google_namespace@::GLOG_ERROR, message)
+ __FILE_NAME__, __LINE__, @ac_google_namespace@::GLOG_ERROR, message)
#else
#define COMPACT_GOOGLE_LOG_ERROR @ac_google_namespace@::NullStream()
#define LOG_TO_STRING_ERROR(message) @ac_google_namespace@::NullStream()
@@ -509,9 +509,9 @@ DECLARE_bool(log_utc_time);
#if GOOGLE_STRIP_LOG <= 3
#define COMPACT_GOOGLE_LOG_FATAL @ac_google_namespace@::LogMessageFatal( \
- __FILE__, __LINE__)
+ __FILE_NAME__, __LINE__)
#define LOG_TO_STRING_FATAL(message) @ac_google_namespace@::LogMessage( \
- __FILE__, __LINE__, @ac_google_namespace@::GLOG_FATAL, message)
+ __FILE_NAME__, __LINE__, @ac_google_namespace@::GLOG_FATAL, message)
#else
#define COMPACT_GOOGLE_LOG_FATAL @ac_google_namespace@::NullStreamFatal()
#define LOG_TO_STRING_FATAL(message) @ac_google_namespace@::NullStreamFatal()
@@ -529,7 +529,7 @@ DECLARE_bool(log_utc_time);
#define COMPACT_GOOGLE_LOG_DFATAL COMPACT_GOOGLE_LOG_ERROR
#elif GOOGLE_STRIP_LOG <= 3
#define COMPACT_GOOGLE_LOG_DFATAL @ac_google_namespace@::LogMessage( \
- __FILE__, __LINE__, @ac_google_namespace@::GLOG_FATAL)
+ __FILE_NAME__, __LINE__, @ac_google_namespace@::GLOG_FATAL)
#else
#define COMPACT_GOOGLE_LOG_DFATAL @ac_google_namespace@::NullStreamFatal()
#endif