Streamline Thumb config.
authormtklein <mtklein@chromium.org>
Thu, 2 Apr 2015 17:47:57 +0000 (10:47 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 2 Apr 2015 17:47:57 +0000 (10:47 -0700)
Enable Thumb2 iff ARM v7.  (We don't turn it on today for ARM <v7, and ARM v8 doesn't support it.)

BUG=skia:

Review URL: https://codereview.chromium.org/1054993002

gyp/common_conditions.gypi
platform_tools/android/bin/android_setup.sh
platform_tools/android/gyp_gen/android_framework_gyp.py
platform_tools/chromeos/bin/chromeos_setup.sh

index 7f0b602..5f99eae 100644 (file)
               '-fno-omit-frame-pointer',
             ],
           }],
-          [ 'skia_arch_type == "arm" and arm_thumb == 1', {
-            'cflags': [
-              '-mthumb',
-            ],
-            # The --fix-cortex-a8 switch enables a link-time workaround for
-            # an erratum in certain Cortex-A8 processors.  The workaround is
-            # enabled by default if you target the ARM v7-A arch profile.
-            # It can be enabled otherwise by specifying --fix-cortex-a8, or
-            # disabled unconditionally by specifying --no-fix-cortex-a8.
-            #
-            # The erratum only affects Thumb-2 code.
-            'conditions': [
-              [ 'arm_version < 7', {
-                'ldflags': [
-                  '-Wl,--fix-cortex-a8',
-                ],
-              }],
-            ],
-          }],
           [ 'skia_arch_type == "arm" and arm_version >= 7', {
             'cflags': [
               '-march=armv7-a',
+              '-mthumb',
             ],
             'ldflags': [
               '-march=armv7-a',
index f936f00..e452d74 100755 (executable)
@@ -104,15 +104,15 @@ setup_device() {
 
   case $TARGET_DEVICE in
     arm)
-      DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0 arm_thumb=0"
+      DEFINES="${DEFINES} skia_arch_type=arm arm_neon=0"
       ANDROID_ARCH="arm"
       ;;
     arm_v7 | nexus_4 | nexus_5 | nexus_6 | nexus_7 | nexus_10 | xoom)
-      DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 arm_version=7 arm_thumb=1"
+      DEFINES="${DEFINES} skia_arch_type=arm arm_neon_optional=1 arm_version=7"
       ANDROID_ARCH="arm"
       ;;
     arm_v7_neon)
-      DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7 arm_thumb=1"
+      DEFINES="${DEFINES} skia_arch_type=arm arm_neon=1 arm_version=7"
       ANDROID_ARCH="arm"
       ;;
     arm64 | nexus_9)
index 787a4d9..34a9eee 100644 (file)
@@ -63,8 +63,8 @@ def main(target_dir, target_file, skia_arch_type, have_neon,
   gyp_defines = ('skia_android_framework=1 OS=android skia_arch_type=%s '
                  % skia_arch_type)
   if skia_arch_type == 'arm':
-    # Always use thumb and version 7 for arm
-    gyp_defines += 'arm_thumb=1 arm_version=7 '
+    # Always version 7 (which implies thumb) for arm
+    gyp_defines += 'arm_version=7 '
     if have_neon:
       gyp_defines += 'arm_neon=1 '
     else:
index 134e80a..721d7d6 100755 (executable)
@@ -35,7 +35,7 @@ setup_device() {
         ;;
     daisy)
         # TODO(mtklein): make this arm_neon=1
-        DEFINES="${DEFINES} skia_arch_type=arm arm_version=7 arm_neon=0 arm_thumb=0"
+        DEFINES="${DEFINES} skia_arch_type=arm arm_version=7 arm_neon=0"
         # TODO(borenet): We have to define skia_warnings_as_errors=0 for the arm
         # build, which throws lots of "mangling of va_list has changed" warnings.
         DEFINES="${DEFINES} skia_warnings_as_errors=0"