From: Matthew Leibowitz Date: Thu, 31 Aug 2017 01:38:31 +0000 (+0200) Subject: Adding support for watchOS X-Git-Tag: accepted/tizen/5.0/unified/20181102.025319~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ddeb7dcf52e6099a8192adbdbd442a517b5d25c9;p=platform%2Fupstream%2FlibSkiaSharp.git Adding support for watchOS --- diff --git a/gn/BUILD.gn b/gn/BUILD.gn index ec7067c..86d1087 100644 --- a/gn/BUILD.gn +++ b/gn/BUILD.gn @@ -33,7 +33,7 @@ declare_args() { malloc = "" enable_bitcode = false - if (is_tvos) { + if (is_tvos || is_watchos) { enable_bitcode = true } } @@ -64,15 +64,16 @@ if (!is_clang && !is_win) { if (is_ios) { if (is_tvos) { - sdk = "appletvos" - if (target_cpu == "x86" || target_cpu == "x64") { - sdk = "appletvsimulator" - } + sdk = "appletv" + } else if (is_watchos) { + sdk = "watch" } else { - sdk = "iphoneos" - if (target_cpu == "x86" || target_cpu == "x64") { - sdk = "iphonesimulator" - } + sdk = "iphone" + } + if (target_cpu == "x86" || target_cpu == "x64") { + sdk += "simulator" + } else { + sdk += "os" } ios_sysroot = exec_script("find_ios_sysroot.py", [ sdk ], "trim string") } @@ -219,6 +220,9 @@ config("default") { } else if (target_cpu == "x64") { _target = "x86_64" } + if (is_watchos && _target == "armv7") { + _target = "armv7k" + } asmflags += [ "-isysroot", ios_sysroot, diff --git a/gn/BUILDCONFIG.gn b/gn/BUILDCONFIG.gn index 49899db..334deb6 100644 --- a/gn/BUILDCONFIG.gn +++ b/gn/BUILDCONFIG.gn @@ -37,8 +37,9 @@ if (current_os == "") { is_android = current_os == "android" is_fuchsia = current_os == "fuchsia" -is_ios = current_os == "ios" || current_os == "tvos" +is_ios = current_os == "ios" || current_os == "tvos" || current_os == "watchos" is_tvos = current_os == "tvos" +is_watchos = current_os == "watchos" is_linux = current_os == "linux" is_mac = current_os == "mac" is_win = current_os == "win" || current_os == "winrt" diff --git a/gn/core.gni b/gn/core.gni index a09e120..55d1112 100644 --- a/gn/core.gni +++ b/gn/core.gni @@ -602,6 +602,6 @@ if (is_win) { if (target_cpu != "arm") { skia_core_sources += [ "$_src/jumper/SkJumper_generated_win.S" ] } -} else if (!is_tvos) { +} else if (!is_tvos && !is_watchos) { skia_core_sources += [ "$_src/jumper/SkJumper_generated.S" ] } diff --git a/src/jumper/SkJumper.cpp b/src/jumper/SkJumper.cpp index 04d326a..960f8ed 100644 --- a/src/jumper/SkJumper.cpp +++ b/src/jumper/SkJumper.cpp @@ -39,7 +39,7 @@ using StageFn = void(void); extern "C" { -#if __has_feature(memory_sanitizer) || defined(SK_BUILD_FOR_TVOS) +#if __has_feature(memory_sanitizer) || defined(SK_BUILD_FOR_TVOS) || defined(SK_BUILD_FOR_WATCHOS) // We'll just run portable code. #elif defined(__aarch64__) @@ -115,7 +115,7 @@ static SkJumper_Engine gPlatform = kPortable; static SkOnce gChooseEngineOnce; static SkJumper_Engine choose_engine() { -#if __has_feature(memory_sanitizer) || defined(SK_BUILD_FOR_TVOS) +#if __has_feature(memory_sanitizer) || defined(SK_BUILD_FOR_TVOS) || defined(SK_BUILD_FOR_WATCHOS) // We'll just run portable code. #elif defined(__aarch64__)