Title: [102624] trunk
Revision
102624
Author
[email protected]
Date
2011-12-12 14:33:45 -0800 (Mon, 12 Dec 2011)

Log Message

Simplify autotools configure.ac
https://bugs.webkit.org/show_bug.cgi?id=74312

Patch by Andy Wingo <[email protected]> on 2011-12-12
Reviewed by Martin Robinson.

.:

* configure.ac: Don't AC_DEFINE so many things.  Many of the
defines were stale (ENABLE_YARR, ENABLE_JIT_OPTIMIZE_CALL, etc),
and with Platform.h we don't need to make an explicit decision
here.  If the user does pass --enable-jit or --disable-jit, effect
that choice via setting JSC_CPPFLAGS.

Source/_javascript_Core:

* GNUmakefile.am: Add JSC_CPPFLAGS to _javascript_core_cppflags.

Modified Paths

Diff

Modified: trunk/ChangeLog (102623 => 102624)


--- trunk/ChangeLog	2011-12-12 22:13:35 UTC (rev 102623)
+++ trunk/ChangeLog	2011-12-12 22:33:45 UTC (rev 102624)
@@ -1,3 +1,16 @@
+2011-12-12  Andy Wingo  <[email protected]>
+
+        Simplify autotools configure.ac
+        https://bugs.webkit.org/show_bug.cgi?id=74312
+
+        Reviewed by Martin Robinson.
+
+        * configure.ac: Don't AC_DEFINE so many things.  Many of the
+        defines were stale (ENABLE_YARR, ENABLE_JIT_OPTIMIZE_CALL, etc),
+        and with Platform.h we don't need to make an explicit decision
+        here.  If the user does pass --enable-jit or --disable-jit, effect
+        that choice via setting JSC_CPPFLAGS.
+
 2011-12-12  Alexis Menard  <[email protected]>
 
         [Qt][WK2] History is not accessible in QML.

Modified: trunk/Source/_javascript_Core/ChangeLog (102623 => 102624)


--- trunk/Source/_javascript_Core/ChangeLog	2011-12-12 22:13:35 UTC (rev 102623)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-12-12 22:33:45 UTC (rev 102624)
@@ -1,3 +1,12 @@
+2011-12-12  Andy Wingo  <[email protected]>
+
+        Simplify autotools configure.ac
+        https://bugs.webkit.org/show_bug.cgi?id=74312
+
+        Reviewed by Martin Robinson.
+
+        * GNUmakefile.am: Add JSC_CPPFLAGS to _javascript_core_cppflags.
+
 2011-12-12  Filip Pizlo  <[email protected]>
 
         DFG GetByVal CSE incorrectly assumes that a non-matching PutByVal cannot clobber

Modified: trunk/Source/_javascript_Core/GNUmakefile.am (102623 => 102624)


--- trunk/Source/_javascript_Core/GNUmakefile.am	2011-12-12 22:13:35 UTC (rev 102623)
+++ trunk/Source/_javascript_Core/GNUmakefile.am	2011-12-12 22:33:45 UTC (rev 102624)
@@ -42,6 +42,7 @@
 	$(_javascript_core_cppflags)
 
 _javascript_core_cppflags += \
+	$(JSC_CPPFLAGS) \
 	-I$(srcdir)/Source \
 	-I$(srcdir)/Source/_javascript_Core \
 	-I$(srcdir)/Source/_javascript_Core/API \

Modified: trunk/configure.ac (102623 => 102624)


--- trunk/configure.ac	2011-12-12 22:13:35 UTC (rev 102623)
+++ trunk/configure.ac	2011-12-12 22:33:45 UTC (rev 102624)
@@ -815,54 +815,16 @@
 esac
 AC_MSG_RESULT([$with_jsengine])
 
-if test "$with_jsengine" = "jsc"; then
-    AC_MSG_CHECKING([whether to enable JIT compilation])
-    AC_ARG_ENABLE([jit],
-                  AC_HELP_STRING([--enable-jit],
-                                 [Enable JIT compilation default=yes]),
-                  [],[enable_jit="yes"])
-    if test "$enable_jit" = "yes"; then
-        case "$host_cpu" in
-            arm*)
-                AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
-                AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
-                AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
-            ;;
-            i*86|x86_64)
-                AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
-                AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
-                AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
-                AC_DEFINE([ENABLE_JIT_OPTIMIZE_CALL], [1], [Define to enable optimizing calls])
-                AC_DEFINE([ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS], [1], [Define to enable optimized property access])
-                AC_DEFINE([ENABLE_JIT_OPTIMIZE_ARITHMETIC], [1], [Define to enable optimized arithmetic])
-                case "$host_cpu" in
-                    i*86)
-                        AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_VA_LIST], [1], [Use stub va_list])
-                    ;;
-                    x86_64)
-                        AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_REGISTER], [1], [Use stub register])
-                        AC_DEFINE([WTF_USE_ALTERNATE_JSIMMEDIATE], [1], [Use alternate JSImmediate])
-                    ;;
-                esac
-            ;;
-            sh4)
-                AC_DEFINE([ENABLE_YARR], [1], [Define to enable YARR])
-                AC_DEFINE([ENABLE_YARR_JIT], [1], [Define to enable YARR JIT])
-                AC_DEFINE([ENABLE_JIT], [1], [Define to enable JIT])
-                AC_DEFINE([WTF_USE_JIT_STUB_ARGUMENT_REGISTER], [1], [Use stub register])
-            ;;
-            *)
-                enable_jit="no (CPU '$host_cpu' not supported)"
-            ;;
-        esac
-    else
-            AC_DEFINE([ENABLE_JIT], [0], [Define to enable JIT])
-    fi
-else
-    AC_DEFINE([ENABLE_JIT], [0], [Define to enable JIT])
-    enable_jit="no"
-fi
-
+AC_MSG_CHECKING([whether to enable JIT compilation])
+AC_ARG_ENABLE(jit,
+              AS_HELP_STRING([--enable-jit],
+                             [Enable JIT compilation (default: autodetect)]))
+case "$enable_jit" in
+  yes) JSC_CPPFLAGS="-DENABLE_JIT=1" ;;
+  no) JSC_CPPFLAGS="-DENABLE_JIT=0" ;;
+  *) enable_jit="autodetect" ;;
+esac
+AC_SUBST(JSC_CPPFLAGS)
 AC_MSG_RESULT([$enable_jit])
 
 # Opcode stats
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to