Title: [104835] trunk/Source/WebCore
Revision
104835
Author
[email protected]
Date
2012-01-12 10:20:05 -0800 (Thu, 12 Jan 2012)

Log Message

When generating derived sources, use the same compiler that is used to compile WebCore.

Fixes <http://webkit.org/b/76189>
[mac] When compiling WebCore with clang, llvm-gcc is used to generate derived sources

Reviewed by Mark Rowe.

* DerivedSources.make: Changed to use the CC environment variable instead of hardcoded gcc.
* WebCore.xcodeproj/project.pbxproj: Set the CC environment variable, if not already set,
according to TARGET_GCC_VERSION. CC is used by DerivedSources.make and some of the perl
scripts it invokes.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (104834 => 104835)


--- trunk/Source/WebCore/ChangeLog	2012-01-12 17:47:44 UTC (rev 104834)
+++ trunk/Source/WebCore/ChangeLog	2012-01-12 18:20:05 UTC (rev 104835)
@@ -1,3 +1,17 @@
+2012-01-12  Dan Bernstein  <[email protected]>
+
+        When generating derived sources, use the same compiler that is used to compile WebCore.
+
+        Fixes <http://webkit.org/b/76189>
+        [mac] When compiling WebCore with clang, llvm-gcc is used to generate derived sources
+
+        Reviewed by Mark Rowe.
+
+        * DerivedSources.make: Changed to use the CC environment variable instead of hardcoded gcc.
+        * WebCore.xcodeproj/project.pbxproj: Set the CC environment variable, if not already set,
+        according to TARGET_GCC_VERSION. CC is used by DerivedSources.make and some of the perl
+        scripts it invokes.
+
 2012-01-12  Pierre Rossi  <[email protected]>
 
         [Qt] Unreviewed build fix after r104828.

Modified: trunk/Source/WebCore/DerivedSources.make (104834 => 104835)


--- trunk/Source/WebCore/DerivedSources.make	2012-01-12 17:47:44 UTC (rev 104834)
+++ trunk/Source/WebCore/DerivedSources.make	2012-01-12 18:20:05 UTC (rev 104835)
@@ -623,13 +623,13 @@
 
 FRAMEWORK_FLAGS = $(shell echo $(BUILT_PRODUCTS_DIR) $(FRAMEWORK_SEARCH_PATHS) | perl -e 'print "-F " . join(" -F ", split(" ", <>));')
 
-ifeq ($(shell gcc -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_DASHBOARD_SUPPORT | cut -d' ' -f3), 1)
+ifeq ($(shell $(CC) -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_DASHBOARD_SUPPORT | cut -d' ' -f3), 1)
     ENABLE_DASHBOARD_SUPPORT = 1
 else
     ENABLE_DASHBOARD_SUPPORT = 0
 endif
 
-ifeq ($(shell gcc -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_ORIENTATION_EVENTS | cut -d' ' -f3), 1)
+ifeq ($(shell $(CC) -E -P -dM $(FRAMEWORK_FLAGS) WebCore/ForwardingHeaders/wtf/Platform.h | grep ENABLE_ORIENTATION_EVENTS | cut -d' ' -f3), 1)
     ENABLE_ORIENTATION_EVENTS = 1
 else
     ENABLE_ORIENTATION_EVENTS = 0

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (104834 => 104835)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-01-12 17:47:44 UTC (rev 104834)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2012-01-12 18:20:05 UTC (rev 104835)
@@ -25260,7 +25260,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore\"\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore\"\n\n/bin/ln -sfh \"${SRCROOT}\" WebCore\nexport WebCore=\"WebCore\"\n\nif [ \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" ]; then\n    make  --no-builtin-rules -f \"WebCore/DerivedSources.make\" -j `/usr/sbin/sysctl -n hw.availcpu`\nfi\n";
+			shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore\"\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebCore\"\n\n/bin/ln -sfh \"${SRCROOT}\" WebCore\nexport WebCore=\"WebCore\"\n\nif [ ! $CC ]; then\n    case $TARGET_GCC_VERSION in\n        (GCC_42)\n            export CC=\"${DT_TOOLCHAIN_DIR}/usr/bin/gcc-4.2\";;\n        (LLVM_GCC_42)\n            export CC=\"${DT_TOOLCHAIN_DIR}/usr/bin/llvm-gcc-4.2\";;\n        (LLVM_COMPILER)\n            export CC=\"${DT_TOOLCHAIN_DIR}/usr/bin/clang\";;\n    esac\nfi\n\nif [ \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" ]; then\n    make  --no-builtin-rules -f \"WebCore/DerivedSources.make\" -j `/usr/sbin/sysctl -n hw.availcpu`\nfi\n";
 		};
 /* End PBXShellScriptBuildPhase section */
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to