Changeset 96808 in webkit


Ignore:
Timestamp:
Oct 6, 2011 6:37:01 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

Provide configure option to switch between JSC and V8.
https://bugs.webkit.org/show_bug.cgi?id=69469

Patch by Nayan Kumar K <nayankk@motorola.com> on 2011-10-06
Reviewed by Philippe Normand.

This is first of the patches to support building of V8 with
WebKit GTK. With this patch, new command line switch named
'--with-jsengine' is introduced, using which we can choose to
build either jsc or v8.

  • GNUmakefile.am:
  • configure.ac:
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r96662 r96808  
     12011-10-06  Nayan Kumar K  <nayankk@motorola.com>
     2
     3        Provide configure option to switch between JSC and V8.
     4        https://bugs.webkit.org/show_bug.cgi?id=69469
     5
     6        Reviewed by Philippe Normand.
     7
     8        This is first of the patches to support building of V8 with
     9        WebKit GTK. With this patch, new command line switch named
     10        '--with-jsengine' is introduced, using which we can choose to
     11        build either jsc or v8.
     12
     13        * GNUmakefile.am:
     14        * configure.ac:
     15
    1162011-10-04  Scott Graham  <scottmg@chromium.org>
    217
  • trunk/GNUmakefile.am

    r96087 r96808  
    199199
    200200# Include module makefiles
     201if USE_JSC
    201202include Source/JavaScriptCore/GNUmakefile.am
     203endif
    202204include Source/WebCore/GNUmakefile.am
    203205include Source/WebKit/gtk/GNUmakefile.am
     
    217219# Autogenerated sources
    218220BUILT_SOURCES += \
    219         $(javascriptcore_built_sources) \
    220         $(javascriptcore_built_nosources) \
    221221        $(webcore_built_sources) \
    222222        $(webcore_built_nosources) \
    223223        $(webkitgtk_built_sources) \
    224224        $(webkitgtk_built_nosources)
     225
     226if USE_JSC
     227BUILT_SOURCES += \
     228        $(javascriptcore_built_sources) \
     229        $(javascriptcore_built_nosources)
     230endif
    225231
    226232DISTCLEANFILES += \
  • trunk/configure.ac

    r96662 r96808  
    794794AC_MSG_RESULT([$enable_debug_features])
    795795
    796 AC_MSG_CHECKING([whether to enable JIT compilation])
    797 AC_ARG_ENABLE([jit],
    798               AC_HELP_STRING([--enable-jit],
    799                              [Enable JIT compilation default=yes]),
    800               [],[enable_jit="yes"])
    801 if test "$enable_jit" = "yes"; then
    802     case "$host_cpu" in
    803         arm*)
    804             AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
    805             AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
    806             AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
    807         ;;
    808         i*86|x86_64)
    809             AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
    810             AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
    811             AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
    812             AC_DEFINE([ENABLE_JIT_OPTIMIZE_CALL], [1], [Define to enable optimizing calls])
    813             AC_DEFINE([ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS], [1], [Define to enable optimized property access])
    814             AC_DEFINE([ENABLE_JIT_OPTIMIZE_ARITHMETIC], [1], [Define to enable optimized arithmetic])
    815             case "$host_cpu" in
    816                 i*86)
    817                     AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_VA_LIST], [1], [Use stub va_list])
    818                 ;;
    819                 x86_64)
    820                     AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_REGISTER], [1], [Use stub register])
    821                     AC_DEFINE([WTF_USE_ALTERNATE_JSIMMEDIATE], [1], [Use alternate JSImmediate])
    822                 ;;
    823             esac
    824         ;;
    825         sh4)
    826             AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
    827             AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
    828             AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
    829             AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_REGISTER], [1], [Use stub register])
    830         ;;
    831         *)
    832             enable_jit="no (CPU '$host_cpu' not supported)"
    833         ;;
    834     esac
     796# Determine JavaScript engine to use.
     797AC_MSG_CHECKING([Javascript engine])
     798AC_ARG_WITH(jsengine,
     799            AC_HELP_STRING([--with-jsengine=@<:@jsc@:>@],
     800                           [Select Javascript engine [default=jsc]]),
     801            [],[with_jsengine="jsc"])
     802
     803case "$with_jsengine" in
     804     jsc) ;;
     805     *) AC_MSG_ERROR([Invalid JS engine: Must be jsc]) ;;
     806esac
     807AC_MSG_RESULT([$with_jsengine])
     808
     809if test "$with_jsengine" = "jsc"; then
     810    AC_MSG_CHECKING([whether to enable JIT compilation])
     811    AC_ARG_ENABLE([jit],
     812                  AC_HELP_STRING([--enable-jit],
     813                                 [Enable JIT compilation default=yes]),
     814                  [],[enable_jit="yes"])
     815    if test "$enable_jit" = "yes"; then
     816        case "$host_cpu" in
     817            arm*)
     818                AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
     819                AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
     820                AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
     821            ;;
     822            i*86|x86_64)
     823                AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
     824                AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
     825                AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
     826                AC_DEFINE([ENABLE_JIT_OPTIMIZE_CALL], [1], [Define to enable optimizing calls])
     827                AC_DEFINE([ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS], [1], [Define to enable optimized property access])
     828                AC_DEFINE([ENABLE_JIT_OPTIMIZE_ARITHMETIC], [1], [Define to enable optimized arithmetic])
     829                case "$host_cpu" in
     830                    i*86)
     831                        AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_VA_LIST], [1], [Use stub va_list])
     832                    ;;
     833                    x86_64)
     834                        AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_REGISTER], [1], [Use stub register])
     835                        AC_DEFINE([WTF_USE_ALTERNATE_JSIMMEDIATE], [1], [Use alternate JSImmediate])
     836                    ;;
     837                esac
     838            ;;
     839            sh4)
     840                AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
     841                AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
     842                AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
     843                AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_REGISTER], [1], [Use stub register])
     844            ;;
     845            *)
     846                enable_jit="no (CPU '$host_cpu' not supported)"
     847            ;;
     848        esac
     849    else
     850            AC_DEFINE([ENABLE_JIT], [0], [Define to enable JIT])
     851    fi
    835852else
    836         AC_DEFINE([ENABLE_JIT], [0], [Define to enable JIT])
    837 fi
     853    AC_DEFINE([ENABLE_JIT], [0], [Define to enable JIT])
     854    enable_jit="no"
     855fi
     856
    838857AC_MSG_RESULT([$enable_jit])
    839858
     
    11031122AM_CONDITIONAL([TARGET_QUARTZ], [test "$with_target" = "quartz"])
    11041123AM_CONDITIONAL([TARGET_DIRECTFB], [test "$with_target" = "directfb"])
     1124
     1125# JS engine conditionals
     1126AM_CONDITIONAL([USE_JSC], [test "$with_jsengine" = "jsc"])
    11051127
    11061128# Unicode backend conditionals
     
    12271249 Font backend                                             : $with_font_backend
    12281250 Optimized memory allocator                               : $enable_fast_malloc
     1251 JavaScript Engine                                        : $with_jsengine
    12291252Features:
    12301253 3D Rendering                                             : $enable_3d_rendering
Note: See TracChangeset for help on using the changeset viewer.