Changeset 44504 in webkit for trunk/JavaScriptCore/wtf/Platform.h


Ignore:
Timestamp:
Jun 8, 2009, 1:47:43 PM (16 years ago)
Author:
[email protected]
Message:

2009-06-07 David Kilzer <[email protected]>

Make JavaScriptCore compile for iPhone and iPhone Simulator

Reviewed by Gavin Barraclough.

  • Configurations/Base.xcconfig: Split GCC_ENABLE_OBJC_GC on $(REAL_PLATFORM_NAME). Added $(ARCHS_UNIVERSAL_IPHONE_OS) to VALID_ARCHS. Added REAL_PLATFORM_NAME_iphoneos, REAL_PLATFORM_NAME_iphonesimulator, HAVE_DTRACE_iphoneos and HAVE_DTRACE_iphonesimulator variables.
  • Configurations/DebugRelase.xcconfig: Split ARCHS definition on $(REAL_PLATFORM_NAME).
  • Configurations/JavaScriptCore.xcconfig: Added EXPORTED_SYMBOLS_FILE_armv6 and EXPORTED_SYMBOLS_FILE_armv7 variables. Split OTHER_LDFLAGS into OTHER_LDFLAGS_BASE and OTHER_LDFLAGS_$(REAL_PLATFORM_NAME) since CoreServices.framework is only linked to on Mac OS X.
  • JavaScriptCore.xcodeproj/project.pbxproj: Removed references to CoreServices.framework since it's linked using OTHER_LDFLAGS in JavaScriptCore.xcconfig.
  • profiler/ProfilerServer.mm: Added #import for iPhone Simulator. (-[ProfilerServer init]): Conditionalize use of NSDistributedNotificationCenter to non-iPhone or iPhone Simulator.
  • wtf/FastMalloc.cpp: (WTF::TCMallocStats::): Build fix for iPhone and iPhone Simulator.
  • wtf/Platform.h: Defined PLATFORM(IPHONE) and PLATFORM(IPHONE_SIMULATOR).
  • wtf/ThreadingPthreads.cpp: (WTF::setThreadNameInternal): Build fix for iPhone and iPhone Simulator.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/Platform.h

    r44437 r44504  
    4747#define BUILDING_ON_LEOPARD 1
    4848#endif
     49#include <TargetConditionals.h>
    4950#endif
    5051
     
    150151#endif
    151152
     153/* PLATFORM(IPHONE) */
     154#if TARGET_OS_EMBEDDED || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
     155#define WTF_PLATFORM_IPHONE 1
     156#endif
     157
     158/* PLATFORM(IPHONE_SIMULATOR) */
     159#if defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR
     160#define WTF_PLATFORM_IPHONE 1
     161#define WTF_PLATFORM_IPHONE_SIMULATOR 1
     162#else
     163#define WTF_PLATFORM_IPHONE_SIMULATOR 0
     164#endif
     165
     166#if !defined(WTF_PLATFORM_IPHONE)
     167#define WTF_PLATFORM_IPHONE 0
     168#endif
     169
    152170/* Graphics engines */
    153171
    154172/* PLATFORM(CG) and PLATFORM(CI) */
    155 #if PLATFORM(MAC)
     173#if PLATFORM(MAC) || PLATFORM(IPHONE)
    156174#define WTF_PLATFORM_CG 1
     175#endif
     176#if PLATFORM(MAC) && !PLATFORM(IPHONE)
    157177#define WTF_PLATFORM_CI 1
    158178#endif
     
    293313#endif
    294314
    295 #if (PLATFORM(MAC) || PLATFORM(WIN)) && !defined(ENABLE_JSC_MULTIPLE_THREADS)
     315#if (PLATFORM(IPHONE) || PLATFORM(MAC) || PLATFORM(WIN)) && !defined(ENABLE_JSC_MULTIPLE_THREADS)
    296316#define ENABLE_JSC_MULTIPLE_THREADS 1
    297317#endif
     
    308328#endif
    309329
    310 #if PLATFORM(MAC)
     330#if PLATFORM(MAC) && !PLATFORM(IPHONE)
    311331#define WTF_PLATFORM_CF 1
    312332#define WTF_USE_PTHREADS 1
     
    326346#endif
    327347
     348#if PLATFORM(IPHONE)
     349#define WTF_PLATFORM_CF 1
     350#define WTF_USE_PTHREADS 1
     351#define ENABLE_FTPDIR 1
     352#define ENABLE_MAC_JAVA_BRIDGE 0
     353#define ENABLE_ICONDATABASE 0
     354#define ENABLE_GEOLOCATION 1
     355#define ENABLE_NETSCAPE_PLUGIN_API 0
     356#define HAVE_READLINE 1
     357#define ENABLE_REPAINT_THROTTLING 1
     358#endif
     359
    328360#if PLATFORM(WIN)
    329361#define WTF_USE_WININET 1
     
    343375
    344376#if !defined(HAVE_ACCESSIBILITY)
    345 #if PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(CHROMIUM)
     377#if PLATFORM(IPHONE) || PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK) || PLATFORM(CHROMIUM)
    346378#define HAVE_ACCESSIBILITY 1
    347379#endif
     
    360392#define HAVE_SYS_TIMEB_H 1
    361393
    362 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
     394#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !PLATFORM(IPHONE)
    363395#define HAVE_MADV_FREE_REUSE 1
     396#define HAVE_MADV_FREE 1
     397#endif
     398
     399#if PLATFORM(IPHONE)
    364400#define HAVE_MADV_FREE 1
    365401#endif
Note: See TracChangeset for help on using the changeset viewer.