[cfe-commits] r46689 - /cfe/trunk/utils/ccc

Bill Wendling isanbard at gmail.com
Sun Feb 3 13:27:47 PST 2008


Author: void
Date: Sun Feb  3 15:27:46 2008
New Revision: 46689

URL: http://llvm.org/viewvc/llvm-project?rev=46689&view=rev
Log:
- ccc creates output objects in same directory as the source file, and
  not in the current directory. This doesn't work with VPATH builds in
  autotooled builds.
- ccc now creates object files without an extension.
- Return exit code 1 if code > 255.

Patch by Torok!

Modified:
    cfe/trunk/utils/ccc

Modified: cfe/trunk/utils/ccc
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/utils/ccc?rev=46689&r1=46688&r2=46689&view=diff

==============================================================================
--- cfe/trunk/utils/ccc (original)
+++ cfe/trunk/utils/ccc Sun Feb  3 15:27:46 2008
@@ -22,6 +22,8 @@
     cmd = ' '.join(args)
     print >> sys.stderr, cmd
     code = os.system(cmd)
+    if code > 255:
+        code = 1
     if code:
         sys.exit(code)
 
@@ -41,7 +43,11 @@
     i = path.rfind('.')
     if i < 0:
         return path
-    return path[:i] + newext
+    j = path.rfind('/', 0, i)
+    print path
+    if j < 0:
+        return path[:i] + "." + newext
+    return path[j+1:i] + "." + newext
 
 def inferlanguage(extension):
     if extension == "c":





More information about the cfe-commits mailing list