diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-17 09:47:05 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-17 09:47:05 +0000 |
commit | ffe904b8e0e12777658fd4c4a5f5e6d251f715c7 (patch) | |
tree | 2b81a11f04719f634901a82c9096e1db95a7cd6b | |
parent | 599f982a262960408e6a6485be64156dfd0b3240 (diff) | |
download | chromium_src-ffe904b8e0e12777658fd4c4a5f5e6d251f715c7.zip chromium_src-ffe904b8e0e12777658fd4c4a5f5e6d251f715c7.tar.gz chromium_src-ffe904b8e0e12777658fd4c4a5f5e6d251f715c7.tar.bz2 |
GN: libjpeg_turbo and various mac fixes
This adds yasm rules for the assembly in libjpeg_turbo and fixes various
issues that show up on the Mac GN build. With this blink_heap_unittests
builds and runs.
R=brettw@chromium.org, kbr@chromium.org
Review URL: https://codereview.chromium.org/334013002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@277689 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | content/browser/BUILD.gn | 1 | ||||
-rw-r--r-- | third_party/libjpeg/BUILD.gn | 11 | ||||
-rw-r--r-- | third_party/libxslt/BUILD.gn | 2 | ||||
-rw-r--r-- | tools/gn/secondary/third_party/libjpeg_turbo/BUILD.gn | 59 | ||||
-rw-r--r-- | ui/gl/BUILD.gn | 5 |
5 files changed, 71 insertions, 7 deletions
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn index 89089da..12b6e98 100644 --- a/content/browser/BUILD.gn +++ b/content/browser/BUILD.gn @@ -334,7 +334,6 @@ source_set("browser") { "web_contents/touch_editable_impl_aura.h", "renderer_host/ui_events_helper.cc", "renderer_host/ui_events_helper.h", - "context_factory.cc", ] } diff --git a/third_party/libjpeg/BUILD.gn b/third_party/libjpeg/BUILD.gn index 1a3ffc6..18a16ee 100644 --- a/third_party/libjpeg/BUILD.gn +++ b/third_party/libjpeg/BUILD.gn @@ -5,6 +5,10 @@ # Do not use the targets in this file unless you need a certain libjpeg # implementation. Use the meta target //third_party:jpeg instead. +config("libjpeg_config") { + include_dirs = [ "." ] +} + source_set("libjpeg") { sources = [ "jcapimin.c", @@ -66,5 +70,10 @@ source_set("libjpeg") { defines = [ "NO_GETENV" ] # getenv() is not thread-safe. configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] + configs += [ + ":libjpeg_config", + "//build/config/compiler:no_chromium_code", + ] + + direct_dependent_configs = [ ":libjpeg_config" ] } diff --git a/third_party/libxslt/BUILD.gn b/third_party/libxslt/BUILD.gn index f543901..edd0c37 100644 --- a/third_party/libxslt/BUILD.gn +++ b/third_party/libxslt/BUILD.gn @@ -67,7 +67,7 @@ static_library("libxslt") { } else if (is_win) { include_dirs = [ "win32" ] } else if (is_mac) { - include_dits = [ "mac" ] + include_dirs = [ "mac" ] } if (is_clang) { diff --git a/tools/gn/secondary/third_party/libjpeg_turbo/BUILD.gn b/tools/gn/secondary/third_party/libjpeg_turbo/BUILD.gn index 0d0248b..4338eea 100644 --- a/tools/gn/secondary/third_party/libjpeg_turbo/BUILD.gn +++ b/tools/gn/secondary/third_party/libjpeg_turbo/BUILD.gn @@ -9,10 +9,15 @@ if (cpu_arch == "arm") { import("//build/config/arm.gni") } -source_set("simd") { +if (cpu_arch == "x86" || cpu_arch == "x64") { + +import("//third_party/yasm/yasm_assemble.gni") + +yasm_assemble("simd_asm") { + defines = [] + if (cpu_arch == "x86") { sources = [ - "simd/jsimd_i386.c", "simd/jccolmmx.asm", "simd/jccolss2.asm", "simd/jcgrammx.asm", @@ -47,9 +52,11 @@ source_set("simd") { "simd/jisseflt.asm", "simd/jsimdcpu.asm", ] + defines += [ + "__x86__", + ] } else if (cpu_arch == "x64") { sources = [ - "simd/jsimd_x86_64.c", "simd/jccolss2-64.asm", "simd/jcgrass2-64.asm", "simd/jcqnts2f-64.asm", @@ -66,6 +73,52 @@ source_set("simd") { "simd/jiss2int-64.asm", "simd/jiss2red-64.asm", ] + defines += [ + "__x86_64__", + ] + } + + if (is_win) { + defines += [ + "MSVC", + ] + include_dirs = [ "win" ] + if (cpu_arch == "x86") { + defines += [ + "WIN32", + ] + } else { + defines += [ + "WIN64", + ] + } + } else if (is_mac) { + defines += [ + "MACHO", + ] + include_dirs = [ "mac" ] + } else if (is_linux) { + defines += [ + "ELF", + ] + include_dirs = [ "linux" ] + } + +} + +} + +source_set("simd") { + if (cpu_arch == "x86") { + deps = [ ":simd_asm" ] + sources = [ + "simd/jsimd_i386.c", + ] + } else if (cpu_arch == "x64") { + deps = [ ":simd_asm" ] + sources = [ + "simd/jsimd_x86_64.c", + ] } else if (cpu_arch == "arm" && arm_version >= 7 && (arm_use_neon || arm_optionally_use_neon)) { sources = [ diff --git a/ui/gl/BUILD.gn b/ui/gl/BUILD.gn index 98c0396..a8f3182 100644 --- a/ui/gl/BUILD.gn +++ b/ui/gl/BUILD.gn @@ -204,7 +204,10 @@ component("gl") { "scoped_cgl.h", ] - libs = [ "OpenGL.framework" ] + libs = [ + "IOSurface.framework", + "OpenGL.framework", + ] } if (is_android) { sources += [ |