[cfe-commits] r67204 - in /cfe/trunk/lib/Driver: Driver.cpp Makefile
Mike Stump
mrs at apple.com
Wed Mar 18 07:00:02 PDT 2009
Author: mrs
Date: Wed Mar 18 09:00:02 2009
New Revision: 67204
URL: http://llvm.org/viewvc/llvm-project?rev=67204&view=rev
Log:
Improve version number.
Modified:
cfe/trunk/lib/Driver/Driver.cpp (contents, props changed)
cfe/trunk/lib/Driver/Makefile
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=67204&r1=67203&r2=67204&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Wed Mar 18 09:00:02 2009
@@ -212,11 +212,22 @@
}
void Driver::PrintVersion() const {
- // FIXME: Get a reasonable version number.
+ static char buf[] = "$URL$";
+ char *zap = strstr(buf, "/lib/Driver");
+ if (zap)
+ *zap = 0;
+ zap = strstr(buf, "/clang/tools/clang");
+ if (zap)
+ *zap = 0;
+ const char *vers = buf+10;
// FIXME: The following handlers should use a callback mechanism, we
// don't know what the client would like to do.
- llvm::errs() << "ccc version 1.0" << "\n";
+ llvm::errs() << "ccc version 1.0 (" << vers << ")" << "\n";
+ // FIXME: Add cmake support and remove #ifdef
+#ifdef TARGET_TRIPLE
+ llvm::errs() << "Target: " << TARGET_TRIPLE << "\n";
+#endif
}
bool Driver::HandleImmediateArgs(const Compilation &C) {
Propchange: cfe/trunk/lib/Driver/Driver.cpp
------------------------------------------------------------------------------
svn:keywords = URL
Modified: cfe/trunk/lib/Driver/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Makefile?rev=67204&r1=67203&r2=67204&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Makefile (original)
+++ cfe/trunk/lib/Driver/Makefile Wed Mar 18 09:00:02 2009
@@ -12,7 +12,7 @@
BUILD_ARCHIVE = 1
CXXFLAGS = -fno-rtti
-CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include
+CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include -DTARGET_TRIPLE='"$(TARGET_TRIPLE)"'
include $(LEVEL)/Makefile.common
More information about the cfe-commits
mailing list