Skip to content

Commit

Permalink
skcms fixup: link missing symbols (#3391)
Browse files Browse the repository at this point in the history
BUILD file provided in initial module release was stale
  • Loading branch information
eustas authored Dec 18, 2024
1 parent 01c4f1d commit bde96c5
Show file tree
Hide file tree
Showing 6 changed files with 162 additions and 1 deletion.
7 changes: 7 additions & 0 deletions modules/skcms/20241202.0.bcr.1/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module(
name = "skcms",
version = "20241202.0.bcr.1",
repo_name = "skcms",
compatibility_level = 1,
)
bazel_dep(name = "platforms", version = "0.0.10")
120 changes: 120 additions & 0 deletions modules/skcms/20241202.0.bcr.1/overlay/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# Pruned copy of https://skia.googlesource.com/skcms/+/refs/heads/main/BUILD.bazel

config_setting(
name = "debug_build",
values = {"compilation_mode": "dbg"},
)
config_setting(
name = "fast_build",
values = {"compilation_mode": "fastbuild"},
)
config_setting(
name = "release_build",
values = {"compilation_mode": "opt"},
)

#########
# SkCMS #
#########
SHARED_COPTS = select({
":debug_build": [
"--optimize=0",
"--debug",
],
":release_build": [
"--optimize=3",
# Strip dead code (in conjunction with linkopts)
"-fdata-sections",
"-ffunction-sections",
],
":fast_build": [
"--optimize=0",
],
})
cc_library(
name = "skcms_public",
srcs = [
"skcms.cc",
"src/skcms_internals.h",
"src/skcms_public.h",
],
hdrs = ["skcms.h"],
deps = [":skcms_TransformBaseline"] +
select({
"@platforms//cpu:x86_64": [
":skcms_TransformHsw",
":skcms_TransformSkx",
],
"//conditions:default": [],
}),
copts = SHARED_COPTS,
)
cc_library(
name = "skcms_TransformBaseline",
srcs = [
"src/skcms_Transform.h",
"src/skcms_TransformBaseline.cc",
"src/skcms_internals.h",
"src/skcms_public.h",
],
# This header does not compile on its own and is meant to be included from skcms_Transform*.cc
textual_hdrs = [
"src/Transform_inl.h",
],
copts = SHARED_COPTS,
)
cc_library(
name = "skcms_TransformHsw",
srcs = [
"src/skcms_Transform.h",
"src/skcms_TransformHsw.cc",
"src/skcms_internals.h",
"src/skcms_public.h",
],
copts = SHARED_COPTS + select({
"@platforms//cpu:x86_64": [
"-mavx2",
"-mf16c",
],
"//conditions:default": [],
}),
# This header does not compile on its own and is meant to be included from skcms_Transform*.cc
textual_hdrs = [
"src/Transform_inl.h",
],
)
cc_library(
name = "skcms_TransformSkx",
srcs = [
"src/skcms_Transform.h",
"src/skcms_TransformSkx.cc",
"src/skcms_internals.h",
"src/skcms_public.h",
],
copts = SHARED_COPTS + select({
"@platforms//cpu:x86_64": [
"-mavx512f",
"-mavx512dq",
"-mavx512cd",
"-mavx512bw",
"-mavx512vl",
],
"//conditions:default": [],
}),
# This header does not compile on its own and is meant to be included from skcms_Transform*.cc
textual_hdrs = [
"src/Transform_inl.h",
],
)
cc_library(
name = "skcms",
hdrs = ["skcms.h"],
visibility = ["//visibility:public"],
deps = [
":skcms_TransformBaseline",
":skcms_TransformHsw",
":skcms_TransformSkx",
":skcms_public",
],
copts = SHARED_COPTS,
)
1 change: 1 addition & 0 deletions modules/skcms/20241202.0.bcr.1/overlay/MODULE.bazel
22 changes: 22 additions & 0 deletions modules/skcms/20241202.0.bcr.1/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
matrix:
platform:
- debian10
- ubuntu2004
- macos
- macos_arm64
- windows
bazel:
- 7.x
- 8.x
build_flags:
- ['--compilation_mode=fastbuild']
- ['--compilation_mode=opt']
- ['--compilation_mode=dbg']
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- '@skcms//:skcms'
build_flags: ${{ build_flags }}
10 changes: 10 additions & 0 deletions modules/skcms/20241202.0.bcr.1/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url": "https://github.com/google/skia/archive/cfb2537954542e3803c8ecc7fdc7969920cb1776.tar.gz",
"integrity": "sha256-8/jlAZSiBObk/VwPGJoKmrQTnLfKNi3HakmC2xMCoHk=",
"strip_prefix": "skia-cfb2537954542e3803c8ecc7fdc7969920cb1776/modules/skcms",
"patch_strip": 0,
"overlay": {
"BUILD.bazel": "sha256-UXjqgVKqQquxbVMEfCS5zCB/O24FyYeduZiUbXeZW70=",
"MODULE.bazel": "sha256-mh8A3QA4w/UC5Z4vLw4/fGJhzPIDOMyi/Z18loitju4="
}
}
3 changes: 2 additions & 1 deletion modules/skcms/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"github:google/skia"
],
"versions": [
"20241202.0"
"20241202.0",
"20241202.0.bcr.1"
],
"yanked_versions": {}
}

0 comments on commit bde96c5

Please sign in to comment.