Changeset 44504 in webkit for trunk/JavaScriptCore


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.
Location:
trunk/JavaScriptCore
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r44496 r44504  
     12009-06-07  David Kilzer  <[email protected]>
     2
     3        Make JavaScriptCore compile for iPhone and iPhone Simulator
     4
     5        Reviewed by Gavin Barraclough.
     6
     7        * Configurations/Base.xcconfig: Split GCC_ENABLE_OBJC_GC on
     8        $(REAL_PLATFORM_NAME).  Added $(ARCHS_UNIVERSAL_IPHONE_OS) to
     9        VALID_ARCHS.  Added REAL_PLATFORM_NAME_iphoneos,
     10        REAL_PLATFORM_NAME_iphonesimulator, HAVE_DTRACE_iphoneos and
     11        HAVE_DTRACE_iphonesimulator variables.
     12        * Configurations/DebugRelase.xcconfig: Split ARCHS definition on
     13        $(REAL_PLATFORM_NAME).
     14        * Configurations/JavaScriptCore.xcconfig: Added
     15        EXPORTED_SYMBOLS_FILE_armv6 and EXPORTED_SYMBOLS_FILE_armv7
     16        variables.  Split OTHER_LDFLAGS into OTHER_LDFLAGS_BASE and
     17        OTHER_LDFLAGS_$(REAL_PLATFORM_NAME) since CoreServices.framework
     18        is only linked to on Mac OS X.
     19        * JavaScriptCore.xcodeproj/project.pbxproj: Removed references
     20        to CoreServices.framework since it's linked using OTHER_LDFLAGS
     21        in JavaScriptCore.xcconfig.
     22        * profiler/ProfilerServer.mm: Added #import for iPhone
     23        Simulator.
     24        (-[ProfilerServer init]): Conditionalize use of
     25        NSDistributedNotificationCenter to non-iPhone or iPhone
     26        Simulator.
     27        * wtf/FastMalloc.cpp:
     28        (WTF::TCMallocStats::): Build fix for iPhone and iPhone
     29        Simulator.
     30        * wtf/Platform.h: Defined PLATFORM(IPHONE) and
     31        PLATFORM(IPHONE_SIMULATOR).
     32        * wtf/ThreadingPthreads.cpp:
     33        (WTF::setThreadNameInternal): Build fix for iPhone and iPhone
     34        Simulator.
     35
    1362009-06-08  Tor Arne Vestbø  <[email protected]>
    237
  • trunk/JavaScriptCore/Configurations/Base.xcconfig

    r44376 r44504  
    2929GCC_ENABLE_CPP_RTTI = NO;
    3030GCC_ENABLE_OBJC_EXCEPTIONS = YES;
    31 GCC_ENABLE_OBJC_GC = supported;
     31GCC_ENABLE_OBJC_GC = $(GCC_ENABLE_OBJC_GC_$(REAL_PLATFORM_NAME));
     32GCC_ENABLE_OBJC_GC_iphoneos = NO;
     33GCC_ENABLE_OBJC_GC_iphonesimulator = NO;
     34GCC_ENABLE_OBJC_GC_macosx = supported;
    3235GCC_ENABLE_SYMBOL_SEPARATION = NO;
    3336GCC_FAST_OBJC_DISPATCH = YES;
     
    4750LINKER_DISPLAYS_MANGLED_NAMES = YES;
    4851PREBINDING = NO;
    49 VALID_ARCHS = i386 ppc x86_64 ppc64;
     52VALID_ARCHS = i386 ppc x86_64 ppc64 $(ARCHS_UNIVERSAL_IPHONE_OS);
    5053WARNING_CFLAGS = $(WARNING_CFLAGS_$(CURRENT_ARCH));
    5154WARNING_CFLAGS_BASE = -Wall -Wextra -Wcast-align -Wcast-qual -Wchar-subscripts -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings;
     
    6164REAL_PLATFORM_NAME = $(REAL_PLATFORM_NAME_$(PLATFORM_NAME));
    6265REAL_PLATFORM_NAME_ = $(REAL_PLATFORM_NAME_macosx);
     66REAL_PLATFORM_NAME_iphoneos = iphoneos;
     67REAL_PLATFORM_NAME_iphonesimulator = iphonesimulator;
    6368REAL_PLATFORM_NAME_macosx = macosx;
    6469
     
    95100// HAVE_DTRACE is disabled on Leopard due to <rdar://problem/5628149>
    96101HAVE_DTRACE = $(HAVE_DTRACE_$(REAL_PLATFORM_NAME));
     102HAVE_DTRACE_iphoneos = 1;
     103HAVE_DTRACE_iphonesimulator = 0;
    97104HAVE_DTRACE_macosx = $(HAVE_DTRACE_macosx_$(MAC_OS_X_VERSION_MAJOR));
    98105HAVE_DTRACE_macosx_ = $(HAVE_DTRACE_macosx_1040);
  • trunk/JavaScriptCore/Configurations/DebugRelease.xcconfig

    r42674 r44504  
    2424#include "Base.xcconfig"
    2525
    26 ARCHS = $(ARCHS_$(MAC_OS_X_VERSION_MAJOR));
    27 ARCHS_ = $(ARCHS_1040);
    28 ARCHS_1040 = $(NATIVE_ARCH);
    29 ARCHS_1050 = $(NATIVE_ARCH);
    30 ARCHS_1060 = $(ARCHS_STANDARD_32_64_BIT);
     26ARCHS = $(ARCHS_$(REAL_PLATFORM_NAME));
     27ARCHS_iphoneos = $(ARCHS_UNIVERSAL_IPHONE_OS);
     28ARCHS_iphonesimulator = $(NATIVE_ARCH);
     29ARCHS_macosx = $(ARCHS_macosx_$(MAC_OS_X_VERSION_MAJOR));
     30ARCHS_macosx_ = $(ARCHS_macosx_1040);
     31ARCHS_macosx_1040 = $(NATIVE_ARCH);
     32ARCHS_macosx_1050 = $(NATIVE_ARCH);
     33ARCHS_macosx_1060 = $(ARCHS_STANDARD_32_64_BIT);
    3134
    3235ONLY_ACTIVE_ARCH = YES;
  • trunk/JavaScriptCore/Configurations/JavaScriptCore.xcconfig

    r42674 r44504  
    2727EXPORTED_SYMBOLS_FILE = $(EXPORTED_SYMBOLS_FILE_$(CURRENT_ARCH));
    2828EXPORTED_SYMBOLS_FILE_ = JavaScriptCore.exp;
     29EXPORTED_SYMBOLS_FILE_armv6 = JavaScriptCore.exp;
     30EXPORTED_SYMBOLS_FILE_armv7 = JavaScriptCore.exp;
    2931EXPORTED_SYMBOLS_FILE_i386 = JavaScriptCore.exp;
    3032EXPORTED_SYMBOLS_FILE_ppc = JavaScriptCore.exp;
    3133EXPORTED_SYMBOLS_FILE_ppc64 = $(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/JavaScriptCore.LP64.exp;
    3234EXPORTED_SYMBOLS_FILE_x86_64 = $(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/JavaScriptCore.LP64.exp;
    33 OTHER_LDFLAGS = -lobjc -sub_library libobjc -Wl,-Y,3;
     35OTHER_LDFLAGS_BASE = -lobjc -Wl,-Y,3;
     36OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(REAL_PLATFORM_NAME));
     37OTHER_LDFLAGS_iphoneos = $(OTHER_LDFLAGS_BASE);
     38OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos);
     39OTHER_LDFLAGS_macosx = $(OTHER_LDFLAGS_BASE) -sub_library libobjc -framework CoreServices;
    3440GCC_PREFIX_HEADER = JavaScriptCorePrefix.h;
    3541HEADER_SEARCH_PATHS = "${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore" $(HEADER_SEARCH_PATHS);
  • trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r44470 r44504  
    148148                930754EB08B0F78500AB3056 /* pcre_exec.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 930754E908B0F78500AB3056 /* pcre_exec.cpp */; settings = {COMPILER_FLAGS = "-fno-move-loop-invariants"; }; };
    149149                932F5BD30822A1C700736975 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6560A4CF04B3B3E7008AE952 /* CoreFoundation.framework */; };
    150                 932F5BD40822A1C700736975 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6560A63D04B3B69F008AE952 /* CoreServices.framework */; };
    151150                932F5BD50822A1C700736975 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 51F0EB6105C86C6B00E6DF1B /* Foundation.framework */; };
    152151                932F5BD60822A1C700736975 /* libobjc.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 51F0EC0705C86C9A00E6DF1B /* libobjc.dylib */; };
     
    578577                6541BD7108E80A17002CBEE7 /* TCSystemAlloc.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = TCSystemAlloc.h; sourceTree = "<group>"; tabWidth = 8; };
    579578                6560A4CF04B3B3E7008AE952 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
    580                 6560A63D04B3B69F008AE952 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
    581579                65621E6B089E859700760F35 /* PropertySlot.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PropertySlot.cpp; sourceTree = "<group>"; tabWidth = 8; };
    582580                65621E6C089E859700760F35 /* PropertySlot.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = PropertySlot.h; sourceTree = "<group>"; tabWidth = 8; };
     
    909907                        files = (
    910908                                932F5BD30822A1C700736975 /* CoreFoundation.framework in Frameworks */,
    911                                 932F5BD40822A1C700736975 /* CoreServices.framework in Frameworks */,
    912909                                932F5BD50822A1C700736975 /* Foundation.framework in Frameworks */,
    913910                                932F5BD70822A1C700736975 /* libicucore.dylib in Frameworks */,
     
    987984                        children = (
    988985                                6560A4CF04B3B3E7008AE952 /* CoreFoundation.framework */,
    989                                 6560A63D04B3B69F008AE952 /* CoreServices.framework */,
    990986                                51F0EB6105C86C6B00E6DF1B /* Foundation.framework */,
    991987                                5D5D8AD00E0D0EBE00F9C692 /* libedit.dylib */,
  • trunk/JavaScriptCore/profiler/ProfilerServer.mm

    r38051 r44504  
    2929#import "JSProfilerPrivate.h"
    3030#import "JSRetainPtr.h"
     31#import <Foundation/Foundation.h>
    3132
    32 #import <Foundation/Foundation.h>
     33#if PLATFORM(IPHONE_SIMULATOR)
     34#import <Foundation/NSDistributedNotificationCenter.h>
     35#endif
    3336
    3437@interface ProfilerServer : NSObject {
     
    6366        [self startProfiling];
    6467
     68#if !PLATFORM(IPHONE) || PLATFORM(IPHONE_SIMULATOR)
     69    // FIXME: <rdar://problem/6546135>
    6570    // The catch-all notifications
    6671    [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(startProfiling) name:@"ProfilerServerStartNotification" object:nil];
    6772    [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(stopProfiling) name:@"ProfilerServerStopNotification" object:nil];
     73#endif
    6874
    6975    // The specific notifications
     
    7177    _serverName = [[NSString alloc] initWithFormat:@"ProfilerServer-%d", [processInfo processIdentifier]];
    7278
     79#if !PLATFORM(IPHONE) || PLATFORM(IPHONE_SIMULATOR)
     80    // FIXME: <rdar://problem/6546135>
    7381    [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(startProfiling) name:[_serverName stringByAppendingString:@"-Start"] object:nil];
    7482    [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(stopProfiling) name:[_serverName stringByAppendingString:@"-Stop"] object:nil];
     83#endif
    7584
    7685    [pool drain];
  • trunk/JavaScriptCore/wtf/FastMalloc.cpp

    r43661 r44504  
    40904090    &FastMallocZone::log, &FastMallocZone::forceLock, &FastMallocZone::forceUnlock, &FastMallocZone::statistics
    40914091
    4092 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
     4092#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !PLATFORM(IPHONE)
    40934093    , 0 // zone_locked will not be called on the zone unless it advertises itself as version five or higher.
    40944094#endif
  • 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
  • trunk/JavaScriptCore/wtf/ThreadingPthreads.cpp

    r43663 r44504  
    184184void setThreadNameInternal(const char* threadName)
    185185{
    186 #if PLATFORM(DARWIN) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
     186#if PLATFORM(DARWIN) && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !PLATFORM(IPHONE)
    187187    pthread_setname_np(threadName);
    188188#else
Note: See TracChangeset for help on using the changeset viewer.