From 6314e19cd386f9d74e057f2a23da65c6e247f629 Mon Sep 17 00:00:00 2001 From: Gary Bressler Date: Fri, 15 Jul 2022 16:44:16 -0700 Subject: [PATCH] [skqp] Delete skqp.cmx This component is no longer used. go/cmxtinction Change-Id: I5e0e226aff7794a749ab095424651d12f19bf898 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/559316 Reviewed-by: Herb Derby Commit-Queue: Herb Derby --- build/fuchsia/skqp/BUILD.gn | 131 ------------------- build/fuchsia/skqp/README.md | 35 ----- build/fuchsia/skqp/append_assets_to_manifest | 73 ----------- build/fuchsia/skqp/cipd_arm64.yaml | 7 - build/fuchsia/skqp/skqp.cmx | 21 --- build/fuchsia/skqp/test_manifest.json | 6 - 6 files changed, 273 deletions(-) delete mode 100644 build/fuchsia/skqp/BUILD.gn delete mode 100644 build/fuchsia/skqp/README.md delete mode 100755 build/fuchsia/skqp/append_assets_to_manifest delete mode 100644 build/fuchsia/skqp/cipd_arm64.yaml delete mode 100644 build/fuchsia/skqp/skqp.cmx delete mode 100644 build/fuchsia/skqp/test_manifest.json diff --git a/build/fuchsia/skqp/BUILD.gn b/build/fuchsia/skqp/BUILD.gn deleted file mode 100644 index f905abd3267a..000000000000 --- a/build/fuchsia/skqp/BUILD.gn +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright 2019 Google LLC. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -assert(is_fuchsia) - -import("//build/fuchsia/sdk.gni") - -pkg_dir = target_gen_dir -pkg_name = "skqp_pkg" - -fuchsia_package(pkg_name) { - testonly = true - name = pkg_name - version = 0 - deps = [ - "//:skqp", - "//build/fuchsia", - ] - pkg_manifest = "${pkg_dir}/${target_name}.manifest" -} - -fuchsia_repo("skqp_repo") { - testonly = true - deps = [ - ":append_assets_to_manifest", - ":base_manifest", - ":skqp_pkg", - ] - - # Put repo directory in out dir (not gen dir). - repo = "$target_out_dir/skqp_repo" - archives = [ "$root_out_dir/far/skqp_pkg.far" ] -} - -# -# Base manifest entries (w/o assets) for SKQP. -# -# TODO(rosasco): Convert this group() to generated_file() when a -# sufficiently modern version of gn rolls in. -group("base_manifest") { - base_pkg_manifest = "${pkg_dir}/base_${pkg_name}.manifest" - - skqp_exec = rebase_path("${root_out_dir}/skqp") - skqp_path = rebase_path("${target_gen_dir}") - - sdk_dist_path = rebase_path("${fuchsia_sdk_path}/arch/${target_cpu}/dist") - sdk_sysroot_dist_path = - rebase_path("${fuchsia_sdk_path}/arch/${target_cpu}/sysroot/dist/lib") - layer_path = rebase_path("${fuchsia_sdk_path}/pkg/vulkan_layers") - - skqp_component_manifest = rebase_path("//build/fuchsia/skqp/skqp.cmx") - - if (target_cpu == "x64" || target_cpu == "x86_64") { - clang_path = - rebase_path("${fuchsia_toolchain_path}/lib/x86_64-unknown-fuchsia/c++") - } else if (target_cpu == "arm64") { - clang_path = - rebase_path("${fuchsia_toolchain_path}/lib/aarch64-unknown-fuchsia/c++") - } else { - assert(false, "Unknown target cpu for Fuchsia target.") - } - - manifest_entries = [ - # Binary - "bin/skqp=${skqp_exec}", - - # Meta Data - "meta/package=${skqp_path}/meta/package", - "meta/skqp.cmx=${skqp_component_manifest}", - - # Shared Libs (clang c++) - "lib/libc++.so.2=${clang_path}/libc++.so.2", - "lib/libc++abi.so.1=${clang_path}/libc++abi.so.1", - "lib/libunwind.so.1=${clang_path}/libunwind.so.1", - - # Shared Libs (sdk dist) - "lib/libasync-default.so=${sdk_dist_path}/libasync-default.so", - "lib/libfdio.so=${sdk_dist_path}/libfdio.so", - "lib/libtrace-engine.so=${sdk_dist_path}/libtrace-engine.so", - - # Loader - "lib/ld.so.1=${sdk_sysroot_dist_path}/ld.so.1", - - # Vulkan ICD / Validation / Loader - "lib/libvulkan.so=${sdk_dist_path}/libvulkan.so", - "lib/VkLayer_khronos_validation.so=${sdk_dist_path}/VkLayer_khronos_validation.so", - - "data/vulkan/explicit_layer.d/VkLayer_khronos_validation.json=${layer_path}/data/vulkan/explicit_layer.d/VkLayer_khronos_validation.json", - ] - - # TODO(rosasco): Add 2 lines when generated_file() switch is implemented - # and remove the 'write_file' below. - # contents = manifest_entries - # outputs = [ base_pkg_manifest ] - - write_file(base_pkg_manifest, manifest_entries) -} - -# -# Asset manifest entries for SKQP. -# -action("append_assets_to_manifest") { - script = "append_assets_to_manifest" - - base_pkg_manifest = "${pkg_dir}/base_${pkg_name}.manifest" - pkg_manifest = "${pkg_dir}/${pkg_name}.manifest" - assets_path = "//platform_tools/android/apps/skqp/src/main/assets" - - inputs = [ assets_path ] - - outputs = [ pkg_manifest ] - - manifest_deps = "$target_out_dir/skqp_manifest.d" - - args = [ - "--root_dir", - rebase_path(assets_path), - "--base_manifest", - rebase_path(base_pkg_manifest), - "--manifest", - rebase_path(pkg_manifest), - "--deps", - rebase_path(manifest_deps), - "--root_build_dir", - rebase_path(root_out_dir), - ] - - deps = [ ":base_manifest" ] - depfile = manifest_deps -} diff --git a/build/fuchsia/skqp/README.md b/build/fuchsia/skqp/README.md deleted file mode 100644 index bd641ad0e585..000000000000 --- a/build/fuchsia/skqp/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# Building SKQP for Fuchsia -Using an arm64 device as an example, to build skqp for Fuchsia: -``` -gn gen out/fuchsia-arm64 --args="is_official_build=false is_debug=false skia_update_fuchsia_sdk=true target_cpu=\"arm64\" target_os=\"fuchsia\" using_fuchsia_sdk=true skia_tools_require_resources=true skia_skqp_global_error_tolerance=8" -``` - -The effect of `skia_update_fuchsia_sdk=true` is that it will download both the Fuchsia SDK and a compatible clang for building SKQP as part of the `gn gen ...` step above. - -Next step, compile skqp for Fuchsia: -``` -autoninja -C out/fuchsia-arm64 ":skqp_repo" -``` - -The effect of this build will be to produce a Fuchsia package repository named `skqp_repo` in the `out` directory of the build. `skqp_repo` can then be served to a Fuchsia device using `//fuchsia/sdk/tools/pm serve -repo skqp_repo` (where // is the skia build root). - -See [install fuchsia packages](https://fuchsia.dev/fuchsia-src/development/sdk/documentation/packages#install-package) for more on serving packages to Fuchsia devices. - -# Fuchsia CIPD Package Creation and Upload Procedure -These steps assume the creation of the arm64 CIPD package as an example. Because the package requires a path from the output directory of the build, the `gn gen` arguments must match the prescribed path declared in `cipd_arm64.yaml` in order for this CIPD package creation and upload to succeed. - -## Create CIPD Package -``` -cipd create -pkg-def=cipd_arm64.yaml -``` - -## Set CIPD Ref of `latest` -If applicable, set `latest` ref to new CIPD package. -``` -cipd set-ref skia/fuchsia/skqp/arch/arm64 -ref latest -version mdhS7sryb2zxQuXT803Dv_XZ0r7B5j8jSbZmIi0JvOcC -``` - -## Set the git-commit Tag -``` -cipd set-tag skia/fuchsia/skqp/arch/arm64 -tag=git-commit:9c2b7cfe9080c6c4692234667a671db216a2e229 -version mdhS7sryb2zxQuXT803Dv_XZ0r7B5j8jSbZmIi0JvOcC -``` diff --git a/build/fuchsia/skqp/append_assets_to_manifest b/build/fuchsia/skqp/append_assets_to_manifest deleted file mode 100755 index f1a0d892522b..000000000000 --- a/build/fuchsia/skqp/append_assets_to_manifest +++ /dev/null @@ -1,73 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2019 Google LLC. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" - Opens |base_manifest| and copies the contents to |manifest| then traverses - |root_dir| and appends every file as a Fuchsia package manifest entry to - |manifest|. -""" - -import argparse -import os -import subprocess - -parser = argparse.ArgumentParser() -parser.add_argument('--root_dir', dest='root_dir', action='store', required=True) -parser.add_argument('--base_manifest', dest='base_manifest', action='store', required=True) -parser.add_argument('--manifest', dest='manifest', action='store', required=True) -parser.add_argument('--deps', dest='deps', action='store', required=True) -parser.add_argument('--root_build_dir', dest='root_build_dir', action='store', required=True) -args = parser.parse_args() - -root_dir = args.root_dir -if not os.path.exists(root_dir): - print "--root_dir path specified: " + root_dir + " doesn't exist.\n" - exit(1) - -base_manifest = args.base_manifest -if not os.path.exists(base_manifest): - print "--base_manifest specified: " + base_manifest + " doesn't exist.\n" - exit(1) - -manifest = args.manifest -root_build_dir = args.root_build_dir - -# Prepend |base_manifest| contents to |manifest|. -deps_file = open(args.deps, 'w') -relative_path = os.path.relpath(args.manifest, root_build_dir) -deps_file.write('%s: ' % relative_path) - -out_file = open(manifest, 'w') -with open(base_manifest, 'r') as in_file: - base_content = in_file.readlines() - -for base_line in base_content: - out_file.write(base_line) - base_line_list = base_line.split("=") - if len(base_line_list) != 2: - print "Error: Base manifest line format error. Expected \"lhs=rhs\" but got: " + base_line - exit(1) - base_line_rhs = base_line_list[1].strip() - relative_path = os.path.relpath(base_line_rhs, root_build_dir) - deps_file.write(relative_path + " ") - -# Append all files discovered under |root_dir| to |manifest|. -files = subprocess.check_output(["find", root_dir, "-type", "f"]) -file_lines = files.splitlines() - -for file in file_lines: - source = file - if not source.startswith(root_dir): - print "Error: source path " + source + " is not under |root_dir|\n" - exit(1) - dest = source[len(root_dir):] - out_file.write('data%s=' % dest) - out_file.write('%s\n' % source) - relative_path = os.path.relpath(source, root_build_dir) - deps_file.write(relative_path + " ") - -out_file.close() -deps_file.close() diff --git a/build/fuchsia/skqp/cipd_arm64.yaml b/build/fuchsia/skqp/cipd_arm64.yaml deleted file mode 100644 index e6a459df3988..000000000000 --- a/build/fuchsia/skqp/cipd_arm64.yaml +++ /dev/null @@ -1,7 +0,0 @@ -package: skia/fuchsia/skqp/arch/arm64 -description: ARM64 build of Skia's skqp test suite for Fuchsia -install_mode: copy -root: ../../.. -data: - - file: build/fuchsia/skqp/test_manifest.json - - file: out/fuchsia-arm64/far/skqp_pkg.far diff --git a/build/fuchsia/skqp/skqp.cmx b/build/fuchsia/skqp/skqp.cmx deleted file mode 100644 index 4661c3db5059..000000000000 --- a/build/fuchsia/skqp/skqp.cmx +++ /dev/null @@ -1,21 +0,0 @@ -{ - "program": { - "binary": "bin/skqp", - "args" : [ "/pkg/data", "skqp/rendertests_fuchsia.txt", "/tmp/logs" ] - }, - "sandbox": { - "dev": [ - "class/display-controller" - ], - "features": [ - "vulkan", - "isolated-temp" - ], - "services": [ - "fuchsia.logger.LogSink", - "fuchsia.sysmem.Allocator", - "fuchsia.tracing.provider.Registry", - "fuchsia.vulkan.loader.Loader" - ] - } -} diff --git a/build/fuchsia/skqp/test_manifest.json b/build/fuchsia/skqp/test_manifest.json deleted file mode 100644 index 4e67279fcbbb..000000000000 --- a/build/fuchsia/skqp/test_manifest.json +++ /dev/null @@ -1,6 +0,0 @@ -[ - { - "package": "skqp_pkg", - "component_name": "skqp" - } -]