<rdar://problem/6635688> Move HAVE_DTRACE check to Base.xcconfig
authorddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Mar 2009 04:18:55 +0000 (04:18 +0000)
committerddkilzer@apple.com <ddkilzer@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Mar 2009 04:18:55 +0000 (04:18 +0000)
        Reviewed by Mark Rowe.

        * Configurations/Base.xcconfig: Set HAVE_DTRACE Xcode variable
        based on PLATFORM_NAME and MAC_OS_X_VERSION_MAJOR.  Also define
        it as a preprocessor macro by modifying
        GCC_PREPROCESSOR_DEFINITIONS.
        * JavaScriptCore.xcodeproj/project.pbxproj: Changed "Generate
        DTrace header" script phase to check for HAVE_DTRACE instead of
        MACOSX_DEPLOYMENT_TARGET.
        * wtf/Platform.h: Removed definition of HAVE_DTRACE macro since
        it's defined in Base.xcconfig now.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@41350 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/Configurations/Base.xcconfig
JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
JavaScriptCore/wtf/Platform.h

index b1c6d1e..6b01e59 100644 (file)
@@ -1,3 +1,19 @@
+2009-03-01  David Kilzer  <ddkilzer@apple.com>
+
+        <rdar://problem/6635688> Move HAVE_DTRACE check to Base.xcconfig
+
+        Reviewed by Mark Rowe.
+
+        * Configurations/Base.xcconfig: Set HAVE_DTRACE Xcode variable
+        based on PLATFORM_NAME and MAC_OS_X_VERSION_MAJOR.  Also define
+        it as a preprocessor macro by modifying
+        GCC_PREPROCESSOR_DEFINITIONS.
+        * JavaScriptCore.xcodeproj/project.pbxproj: Changed "Generate
+        DTrace header" script phase to check for HAVE_DTRACE instead of
+        MACOSX_DEPLOYMENT_TARGET.
+        * wtf/Platform.h: Removed definition of HAVE_DTRACE macro since
+        it's defined in Base.xcconfig now.
+
 2009-03-01  Horia Olaru  <olaru@adobe.com>
 
         By looking in grammar.y there are only a few types of statement nodes
index 4154cb8..77408b2 100644 (file)
@@ -12,7 +12,7 @@ GCC_INLINES_ARE_PRIVATE_EXTERN = YES;
 GCC_MODEL_TUNING = G5;
 GCC_OBJC_CALL_CXX_CDTORS = YES;
 GCC_PRECOMPILE_PREFIX_HEADER = YES;
-GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST $(GCC_PREPROCESSOR_DEFINITIONS);
+GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) HAVE_DTRACE=$(HAVE_DTRACE) WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST $(GCC_PREPROCESSOR_DEFINITIONS);
 GCC_STRICT_ALIASING = YES;
 GCC_THREADSAFE_STATICS = NO;
 GCC_TREAT_WARNINGS_AS_ERRORS = YES;
@@ -57,6 +57,16 @@ GCC_VERSION = $(GCC_VERSION_$(XCODE_VERSION_ACTUAL));
 GCC_VERSION_0310 = 4.2;
 
 
+// HAVE_DTRACE is disabled on Leopard due to <rdar://problem/5628149>
+HAVE_DTRACE = $(HAVE_DTRACE_$(PLATFORM_NAME));
+HAVE_DTRACE_ = $(HAVE_DTRACE_macosx);
+HAVE_DTRACE_macosx = $(HAVE_DTRACE_macosx_$(MAC_OS_X_VERSION_MAJOR));
+HAVE_DTRACE_macosx_ = $(HAVE_DTRACE_macosx_1040);
+HAVE_DTRACE_macosx_1040 = 0;
+HAVE_DTRACE_macosx_1050 = 0;
+HAVE_DTRACE_macosx_1060 = 1;
+
+
 // <rdar://problem/5488678>: Production builds on 10.4 PowerPC need to have debugging symbols disabled to prevent a huge STABS section being generated.
 //                           Xcode on 10.4 does not define MAC_OS_X_VERSION_MAJOR, so the default Mac OS X version is treated as 10.4.
 GCC_GENERATE_DEBUGGING_SYMBOLS = $(GCC_GENERATE_DEBUGGING_SYMBOLS_$(CURRENT_ARCH));
index 7955ec9..6599364 100644 (file)
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                        shellPath = /bin/sh;
-                       shellScript = "TRACING_D=\"$SRCROOT/runtime/Tracing.d\";\nTRACING_H=\"$BUILT_PRODUCTS_DIR/DerivedSources/JavaScriptCore/TracingDtrace.h\";\n\nif [[ \"$MACOSX_DEPLOYMENT_TARGET\" > \"10.5\" ]];\nthen\n\tdtrace -h -o \"$TRACING_H\" -s \"$TRACING_D\";\nfi;\n";
+                       shellScript = "TRACING_D=\"$SRCROOT/runtime/Tracing.d\";\nTRACING_H=\"$BUILT_PRODUCTS_DIR/DerivedSources/JavaScriptCore/TracingDtrace.h\";\n\nif [[ \"$HAVE_DTRACE\" = \"1\" ]];\nthen\n\tdtrace -h -o \"$TRACING_H\" -s \"$TRACING_D\";\nfi;\n";
                };
                5D5D8ABF0E0D0B0300F9C692 /* Fix Framework Reference */ = {
                        isa = PBXShellScriptBuildPhase;
index ca767b7..cec420c 100644 (file)
 #define ENABLE_DASHBOARD_SUPPORT 1
 #endif
 #define HAVE_READLINE 1
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
-#define HAVE_DTRACE 1
-#endif
 #endif
 
 #if PLATFORM(CHROMIUM) && PLATFORM(DARWIN)