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

Side by Side Diff: skia/BUILD.gn

Issue 377833002: GN: Fix skia build on mac, use -msse4.1 everywhere (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/features.gni") 5 import("//build/config/features.gni")
6 import("//build/config/ui.gni") 6 import("//build/config/ui.gni")
7 if (cpu_arch == "arm") { 7 if (cpu_arch == "arm") {
8 import("//build/config/arm.gni") 8 import("//build/config/arm.gni")
9 } 9 }
10 10
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 if (is_posix) { 129 if (is_posix) {
130 defines += [ "SK_USE_POSIX_THREADS" ] 130 defines += [ "SK_USE_POSIX_THREADS" ]
131 } 131 }
132 132
133 if (is_android) { 133 if (is_android) {
134 defines += [ 134 defines += [
135 "SK_BUILD_FOR_ANDROID", 135 "SK_BUILD_FOR_ANDROID",
136 "USE_CHROMIUM_SKIA", 136 "USE_CHROMIUM_SKIA",
137 ] 137 ]
138 } 138 }
139
140 if (is_mac) {
141 defines += [ "SK_BUILD_FOR_MAC" ]
142 }
139 } 143 }
140 144
141 # Internal-facing config for Skia library code. 145 # Internal-facing config for Skia library code.
142 config("skia_library_config") { 146 config("skia_library_config") {
143 # These include directories are only included for Skia code and are not 147 # These include directories are only included for Skia code and are not
144 # exported to dependents. It's not clear if this is on purpose, but this 148 # exported to dependents. It's not clear if this is on purpose, but this
145 # matches the GYP build. 149 # matches the GYP build.
146 include_dirs = [] 150 include_dirs = []
147 if (is_mac || is_ios) { 151 if (is_mac || is_ios) {
148 include_dirs += [ "//third_party/skia/include/utils/mac" ] 152 include_dirs += [ "//third_party/skia/include/utils/mac" ]
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 "//third_party/skia/include/core/SkTypes.h", 556 "//third_party/skia/include/core/SkTypes.h",
553 ] 557 ]
554 558
555 # SSE 4 559 # SSE 4
556 if (cpu_arch == "x86") { 560 if (cpu_arch == "x86") {
557 sources += [ "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_asm.S" ] 561 sources += [ "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_asm.S" ]
558 } else { # x64 562 } else { # x64
559 sources += [ "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_x64_asm.S" ] 563 sources += [ "//third_party/skia/src/opts/SkBlitRow_opts_SSE4_x64_asm.S" ]
560 } 564 }
561 565
562 if (is_linux || is_mac) { 566 if (is_linux) {
563 cflags += [ "-msse4" ] 567 cflags += [ "-msse4" ]
568 } else if (is_mac) {
569 cflags += [ "-msse4.1" ]
Nico 2014/07/08 17:20:52 Is this actually needed? This currently uses msse4
564 } 570 }
565 } else if (cpu_arch == "arm") { 571 } else if (cpu_arch == "arm") {
566 sources = [ 572 sources = [
567 "//third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp", 573 "//third_party/skia/src/opts/SkBitmapProcState_opts_arm.cpp",
568 ] 574 ]
569 575
570 # The assembly uses the frame pointer register (r7 in Thumb/r11 in 576 # The assembly uses the frame pointer register (r7 in Thumb/r11 in
571 # ARM), the compiler doesn't like that. 577 # ARM), the compiler doesn't like that.
572 cflags += [ "-fomit-frame-pointer" ] 578 cflags += [ "-fomit-frame-pointer" ]
573 579
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
659 ":skia_config", 665 ":skia_config",
660 "//build/config/compiler:no_chromium_code" 666 "//build/config/compiler:no_chromium_code"
661 ] 667 ]
662 668
663 deps = [ 669 deps = [
664 "//base", 670 "//base",
665 ] 671 ]
666 672
667 visibility = ":skia" 673 visibility = ":skia"
668 } 674 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698