aboutsummaryrefslogtreecommitdiffhomepage
path: root/gyp
diff options
context:
space:
mode:
authorGravatar scroggo <scroggo@google.com>2015-02-12 10:48:25 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-02-12 10:48:25 -0800
commitdf1c3373fc198f465cb0077516993dd41f268416 (patch)
tree5df85329712ed32721983b72a8db3f1e474899c6 /gyp
parent9d7ceca35064b71e13e498da7e641e69b97bf4cf (diff)
Don't use m32 cflag for x86_64.
When checking the skia_arch_type for "x86", instead of doing an == compare, check if "x86" in skia_arch_type, so it will cover both x86 and x86_64. Except when we specifically want x86. Set skia_arch_width based on "64" in skia_arch_type. No need to specify in scripts. In gyp_to_android.py, create a separate var_dict for x86_64. BUG=skia:3419 Review URL: https://codereview.chromium.org/916113002
Diffstat (limited to 'gyp')
-rw-r--r--gyp/common_conditions.gypi6
-rw-r--r--gyp/common_variables.gypi23
-rw-r--r--gyp/opts.gyp7
-rw-r--r--gyp/skia_lib.gyp2
4 files changed, 25 insertions, 13 deletions
diff --git a/gyp/common_conditions.gypi b/gyp/common_conditions.gypi
index 9e8ce3ffbf..53bfd2d931 100644
--- a/gyp/common_conditions.gypi
+++ b/gyp/common_conditions.gypi
@@ -227,7 +227,7 @@
'conditions': [
[ 'skia_os != "chromeos"', {
'conditions': [
- [ 'skia_arch_width == 64 and skia_arch_type == "x86"', {
+ [ 'skia_arch_type == "x86_64"', {
'cflags': [
'-m64',
],
@@ -235,7 +235,7 @@
'-m64',
],
}],
- [ 'skia_arch_width == 32 and skia_arch_type == "x86"', {
+ [ 'skia_arch_type == "x86"', {
'cflags': [
'-m32',
],
@@ -628,7 +628,7 @@
'-fuse-ld=gold',
],
'conditions': [
- [ 'skia_arch_type == "x86"', {
+ [ '"x86" in skia_arch_type', {
'cflags': [
'-mssse3',
],
diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi
index f89c08b95e..a20550b08d 100644
--- a/gyp/common_variables.gypi
+++ b/gyp/common_variables.gypi
@@ -40,14 +40,23 @@
# Variables needed by conditions list within the level-2 variables dict.
'variables': { # level 3
- # We use 'skia_os' instead of 'OS' throughout our gyp files, to allow
- # for cross-compilation (e.g. building for either MacOS or iOS on Mac).
- # We set it automatically based on 'OS' (the host OS), but allow the
- # user to override it via GYP_DEFINES if they like.
- 'skia_os%': '<(OS)',
+ 'variables': { # level 4
+ # We use 'skia_os' instead of 'OS' throughout our gyp files, to allow
+ # for cross-compilation (e.g. building for either MacOS or iOS on Mac).
+ # We set it automatically based on 'OS' (the host OS), but allow the
+ # user to override it via GYP_DEFINES if they like.
+ 'skia_os%': '<(OS)',
+ },
+ 'skia_os%': '<(skia_os)',
'skia_android_framework%': 0,
- 'skia_arch_type%': 'x86',
+ 'conditions' : [
+ [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "mac"]', {
+ 'skia_arch_type%': 'x86_64',
+ }, {
+ 'skia_arch_type%': 'x86',
+ }],
+ ],
'arm_version%': 0,
'arm_neon%': 0,
'skia_egl%': 0,
@@ -82,7 +91,7 @@
}, {
'skia_poppler_enabled%': 0,
}],
- [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "mac"] or skia_arch_type == "arm64"', {
+ ['"64" in skia_arch_type', {
'skia_arch_width%': 64,
}, {
'skia_arch_width%': 32,
diff --git a/gyp/opts.gyp b/gyp/opts.gyp
index 2fb1468f50..6ff900863c 100644
--- a/gyp/opts.gyp
+++ b/gyp/opts.gyp
@@ -1,3 +1,4 @@
+# Gyp file for building opts target.
{
# Source lists live in opts.gypi. This makes it easier to maintain our Chrome GYP/GN setup.
# (To be honest, I'm not sure why we need to include common.gypi. I thought it was automatic.)
@@ -26,7 +27,7 @@
'../include/utils',
],
'conditions': [
- [ 'skia_arch_type == "x86" and skia_os != "ios"', {
+ [ '"x86" in skia_arch_type and skia_os != "ios"', {
'cflags': [ '-msse2' ],
'dependencies': [ 'opts_ssse3', 'opts_sse41' ],
'sources': [ '<@(sse2_sources)' ],
@@ -44,7 +45,9 @@
[ '(skia_arch_type == "arm" and arm_version < 7) \
or (skia_os == "ios") \
- or (skia_os == "android" and skia_arch_type not in ["x86", "arm", "mips", "arm64"])', {
+ or (skia_os == "android" \
+ and skia_arch_type not in ["x86", "x86_64", "arm", "mips", \
+ "arm64"])', {
'sources': [ '<@(none_sources)' ],
}],
diff --git a/gyp/skia_lib.gyp b/gyp/skia_lib.gyp
index 9f6187152d..cc4984aa7f 100644
--- a/gyp/skia_lib.gyp
+++ b/gyp/skia_lib.gyp
@@ -12,7 +12,7 @@
'utils.gyp:utils',
],
'conditions': [
- [ 'skia_arch_type == "x86" and skia_os != "android"', {
+ [ '"x86" in skia_arch_type and skia_os != "android"', {
'component_libs': [
'opts.gyp:opts_ssse3',
'opts.gyp:opts_sse41',