Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(117)

Unified Diff: BUILD.gn

Issue 2247413003: GN: make current_cpu work (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update BUILD.gn Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gn/BUILDCONFIG.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: BUILD.gn
diff --git a/BUILD.gn b/BUILD.gn
index d7dd484fc3f0148d77be07894844c8061aa87487..d18fa4c514cdb319895a0c812f734ce01cc5a926 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -144,32 +144,38 @@ utils_gypi = exec_script("gn/gypi_to_gn.py",
"scope",
[ "gyp/utils.gypi" ])
-source_set("opts_ssse3") {
- configs += skia_library_configs
-
- sources = opts_gypi.ssse3_sources
- cflags = [ "-mssse3" ]
-}
-
-source_set("opts_sse41") {
- configs += skia_library_configs
+is_x86 = current_cpu == "x64" || current_cpu == "x86"
- sources = opts_gypi.sse41_sources
- cflags = [ "-msse4.1" ]
-}
+if (is_x86) {
+ source_set("opts_sse2") {
+ configs += skia_library_configs
+ sources = opts_gypi.sse2_sources
+ cflags = [ "-msse2" ]
+ }
-source_set("opts_sse42") {
- configs += skia_library_configs
+ source_set("opts_ssse3") {
+ configs += skia_library_configs
+ sources = opts_gypi.ssse3_sources
+ cflags = [ "-mssse3" ]
+ }
- sources = opts_gypi.sse42_sources
- cflags = [ "-msse4.2" ]
-}
+ source_set("opts_sse41") {
+ configs += skia_library_configs
+ sources = opts_gypi.sse41_sources
+ cflags = [ "-msse4.1" ]
+ }
-source_set("opts_avx") {
- configs += skia_library_configs
+ source_set("opts_sse42") {
+ configs += skia_library_configs
+ sources = opts_gypi.sse42_sources
+ cflags = [ "-msse4.2" ]
+ }
- sources = opts_gypi.avx_sources
- cflags = [ "-mavx" ]
+ source_set("opts_avx") {
+ configs += skia_library_configs
+ sources = opts_gypi.avx_sources
+ cflags = [ "-mavx" ]
+ }
}
component("skia") {
@@ -177,10 +183,6 @@ component("skia") {
configs += skia_library_configs
deps = [
- ":opts_avx",
- ":opts_sse41",
- ":opts_sse42",
- ":opts_ssse3",
"//third_party/expat",
"//third_party/giflib",
"//third_party/libjpeg_turbo",
@@ -189,6 +191,15 @@ component("skia") {
"//third_party/sfntly",
"//third_party/zlib",
]
+ if (is_x86) {
+ deps += [
+ ":opts_avx",
+ ":opts_sse2",
+ ":opts_sse41",
+ ":opts_sse42",
+ ":opts_ssse3",
+ ]
+ }
if (!is_win) {
libs = [ "pthread" ]
@@ -198,7 +209,6 @@ component("skia") {
sources += core_gypi.sources
sources += effects_gypi.sources
sources += gpu_gypi.skgpu_sources
- sources += opts_gypi.sse2_sources
sources += pdf_gypi.sources
sources += utils_gypi.sources
sources += [
« no previous file with comments | « no previous file | gn/BUILDCONFIG.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698