[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    icecream
From:       Luboš Luňák <l.lunak () kde ! org>
Date:       2012-07-13 20:19:41
Message-ID: 20120713201941.B07A9AC7A9 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1305558 by lunakl:

-Wp,-rewrite-includes -> -frewrite-includes
    
It looks like Clang upstream has renamed the option just for the fun of it,
so let's try going with just the option upstream has.



 M  +1 -1      NEWS  
 M  +3 -14     client/cpp.cpp  
 M  +1 -1      client/local.cpp  
 M  +1 -1      client/main.cpp  
 M  +3 -3      configure.in  


--- trunk/icecream/NEWS #1305557:1305558
@@ -1,7 +1,7 @@
 ?
 - support for Clang compiler
   Clang now should work out of the box just like GCC.
-  Clang with -Wp,-rewrite-includes option is recommended (3.2+ or patched).
+  Clang with -frewrite-includes option is recommended (3.2+ or patched).
 - support 'icecc <compilername>' properly
 - try to avoid compiling on the local machine if it is busy
 - do not use old compiler if it was changed while icecream daemon was running
--- trunk/icecream/client/cpp.cpp #1305557:1305558
@@ -116,7 +116,7 @@
 	    int argc = flags.size();
 	    argc++; // the program
 	    argc += 2; // -E file.i
-	    argc += 2; // -Wp,-rewrite-includes -CC
+	    argc += 1; // -frewrite-includes
 	    argv = new char*[argc + 1];
    	    argv[0] = strdup( find_compiler( job ).c_str() );
 	    int i = 1;
@@ -126,19 +126,8 @@
 	    }
 	    argv[i++] = strdup( "-E" );
 	    argv[i++] = strdup( job.inputFile().c_str() );
-	    if ( compiler_only_rewrite_includes( job )) {
-	        argv[i++] = strdup( "-Wp,-rewrite-includes" );
-	        // The -CC option actually does nothing. The resulting files from \
                -rewrite-includes
-	        // is rather large, because it in practice is a merge of all the included \
                files,
-	        // including the comments, so at one point in time the patch implementing
-	        // -rewrite-includes had options to strip the comments that would never be \
                visible
-	        // in clang's error messages. That reduced the network traffic, but I don't \
                find
-	        // the additional CPU power needed to parse the comments worth it, so
-	        // -rewrite-includes now again ignores -CC. However that version of the \
                patch
-	        // has already made it into openSUSE 12.2, so use -CC, in case the clang
-	        // used is that one, because it otherwise would strip the comments.
-	        argv[i++] = strdup( "-CC" );
-	    }
+	    if ( compiler_only_rewrite_includes( job ))
+	        argv[i++] = strdup( "-frewrite-includes" );
 	    argv[i++] = 0;
 	}
 
--- trunk/icecream/client/local.cpp #1305557:1305558
@@ -127,7 +127,7 @@
 for example error messages quote (already preprocessed) parts of the source.
 Therefore it is better to only locally merge all #include files into the source
 file and do the actual preprocessing remotely together with compiling.
-There exists a Clang patch to implement option -rewrite-includes that does
+There exists a Clang patch to implement option -frewrite-includes that does
 such #include rewritting, and it's been only recently merged upstream.
 */
 bool compiler_only_rewrite_includes( const CompileJob& job )
--- trunk/icecream/client/main.cpp #1305557:1305558
@@ -89,7 +89,7 @@
 "   ICECC_CC                   set C compiler name (default gcc).\n"
 "   ICECC_CXX                  set C++ compiler name (default g++).\n"
 "   ICECC_CLANG_REMOTE_CPP     set to 1 or 0 to override remote precompiling with \
                clang\n"
-"                              (requires clang -Wp,-rewrite-includes option).\n"
+"                              (requires clang -frewrite-includes option).\n"
 "\n");
 }
 
--- trunk/icecream/configure.in #1305557:1305558
@@ -232,11 +232,11 @@
         # can't detect if the option is supported, but that's too old clang anyway
     else
         AC_MSG_RESULT(yes)
-        AC_MSG_CHECKING([for clang -E -Wp,-rewrite-includes])
-        $CLANG -Werror -E -Wp,-rewrite-includes - >/dev/null 2>/dev/null
+        AC_MSG_CHECKING([for clang -E -frewrite-includes])
+        $CLANG -Werror -E -frewrite-includes - >/dev/null 2>/dev/null
         if test $? -eq 0; then
             AC_MSG_RESULT(yes)
-            AC_DEFINE(HAVE_CLANG_REWRITE_INCLUDES, 1, [Define to 1 if clang supports \
-Wp,-rewrite-includes]) +            AC_DEFINE(HAVE_CLANG_REWRITE_INCLUDES, 1, \
[Define to 1 if clang supports -frewrite-includes])  else
             AC_MSG_RESULT(no)
         fi


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic