Fossil SCM

Add Clang to the list of detected compilers in 'config.h'.

mistachkin 2016-05-27 21:14 trunk
Commit 67cdb9b186ee858953b71df33c1891c4195a99ee
1 file changed +13 -2
+13 -2
--- src/config.h
+++ src/config.h
@@ -137,12 +137,21 @@
137137
# if defined(COMPILER_VERSION) && !defined(NO_COMPILER_VERSION)
138138
# define COMPILER_NAME "mingw32-" COMPILER_VERSION
139139
# else
140140
# define COMPILER_NAME "mingw32"
141141
# endif
142
-# elif defined(_WIN32)
143
-# define COMPILER_NAME "win32"
142
+# elif defined(__clang__)
143
+# if !defined(COMPILER_VERSION)
144
+# if defined(__clang_version__)
145
+# define COMPILER_VERSION __clang_version__
146
+# endif
147
+# endif
148
+# if defined(COMPILER_VERSION) && !defined(NO_COMPILER_VERSION)
149
+# define COMPILER_NAME "clang-" COMPILER_VERSION
150
+# else
151
+# define COMPILER_NAME "clang"
152
+# endif
144153
# elif defined(__GNUC__)
145154
# if !defined(COMPILER_VERSION)
146155
# if defined(__VERSION__)
147156
# define COMPILER_VERSION __VERSION__
148157
# endif
@@ -150,10 +159,12 @@
150159
# if defined(COMPILER_VERSION) && !defined(NO_COMPILER_VERSION)
151160
# define COMPILER_NAME "gcc-" COMPILER_VERSION
152161
# else
153162
# define COMPILER_NAME "gcc"
154163
# endif
164
+# elif defined(_WIN32)
165
+# define COMPILER_NAME "win32"
155166
# else
156167
# define COMPILER_NAME "unknown"
157168
# endif
158169
#endif
159170
160171
--- src/config.h
+++ src/config.h
@@ -137,12 +137,21 @@
137 # if defined(COMPILER_VERSION) && !defined(NO_COMPILER_VERSION)
138 # define COMPILER_NAME "mingw32-" COMPILER_VERSION
139 # else
140 # define COMPILER_NAME "mingw32"
141 # endif
142 # elif defined(_WIN32)
143 # define COMPILER_NAME "win32"
 
 
 
 
 
 
 
 
 
144 # elif defined(__GNUC__)
145 # if !defined(COMPILER_VERSION)
146 # if defined(__VERSION__)
147 # define COMPILER_VERSION __VERSION__
148 # endif
@@ -150,10 +159,12 @@
150 # if defined(COMPILER_VERSION) && !defined(NO_COMPILER_VERSION)
151 # define COMPILER_NAME "gcc-" COMPILER_VERSION
152 # else
153 # define COMPILER_NAME "gcc"
154 # endif
 
 
155 # else
156 # define COMPILER_NAME "unknown"
157 # endif
158 #endif
159
160
--- src/config.h
+++ src/config.h
@@ -137,12 +137,21 @@
137 # if defined(COMPILER_VERSION) && !defined(NO_COMPILER_VERSION)
138 # define COMPILER_NAME "mingw32-" COMPILER_VERSION
139 # else
140 # define COMPILER_NAME "mingw32"
141 # endif
142 # elif defined(__clang__)
143 # if !defined(COMPILER_VERSION)
144 # if defined(__clang_version__)
145 # define COMPILER_VERSION __clang_version__
146 # endif
147 # endif
148 # if defined(COMPILER_VERSION) && !defined(NO_COMPILER_VERSION)
149 # define COMPILER_NAME "clang-" COMPILER_VERSION
150 # else
151 # define COMPILER_NAME "clang"
152 # endif
153 # elif defined(__GNUC__)
154 # if !defined(COMPILER_VERSION)
155 # if defined(__VERSION__)
156 # define COMPILER_VERSION __VERSION__
157 # endif
@@ -150,10 +159,12 @@
159 # if defined(COMPILER_VERSION) && !defined(NO_COMPILER_VERSION)
160 # define COMPILER_NAME "gcc-" COMPILER_VERSION
161 # else
162 # define COMPILER_NAME "gcc"
163 # endif
164 # elif defined(_WIN32)
165 # define COMPILER_NAME "win32"
166 # else
167 # define COMPILER_NAME "unknown"
168 # endif
169 #endif
170
171

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button