Skip to content

Commit

Permalink
Add a license file for impellerc, rename font-subset license (flutter…
Browse files Browse the repository at this point in the history
  • Loading branch information
dnfield authored Jun 7, 2022
1 parent 5773377 commit 1931ec4
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 8 deletions.
2 changes: 1 addition & 1 deletion ci/licenses_golden/tool_signature
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Signature: 96de64fbd5966f7a30ec61d47d1ac204
Signature: 2b69b9b3b985d18a9c148d38f9cefb46

46 changes: 45 additions & 1 deletion impeller/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# found in the LICENSE file.

import("//flutter/impeller/tools/impeller.gni")
import("//flutter/shell/version/version.gni")

impeller_component("compiler_lib") {
sources = [
Expand Down Expand Up @@ -31,12 +32,52 @@ impeller_component("compiler_lib") {
"../base",
"../geometry",
"//flutter/fml",

# All third_party deps must be reflected below in the impellerc_license
# target.
"//third_party/inja",
"//third_party/shaderc_flutter",
"//third_party/spirv_cross_flutter",
]
}

generated_file("impellerc_license") {
source_path = rebase_path(".", "//flutter")
git_url = "https://github.com/flutter/engine/tree/$engine_version"
outputs = [ "$target_gen_dir/LICENSE.impellerc.md" ]
contents = [
"# impellerc",
"",
"This tool is used by the Flutter SDK to compile shaders.",
"",
"Source code for this tool: [flutter/engine/$source_path]($git_url/$source_path).",
"",
"## Licenses",
"",
"### impellerc",
"",
read_file("//flutter/sky/packages/sky_engine/LICENSE", "string"),
"",

# These licenses are ignored by the main license checker, since they are not
# shipped to end-application binaries and only shipped as part of developer
# tooling in impellerc. Add them here.
"## Additional open source licenses",
"",
"### inja",
"",
read_file("//third_party/inja/LICENSE", "string"),
"",
"### shaderc",
"",
read_file("//third_party/shaderc/LICENSE", "string"),
"",
"### spirv_cross",
"",
read_file("//third_party/spirv_cross/LICENSE", "string"),
]
}

impeller_component("impellerc") {
target_type = "executable"

Expand All @@ -46,7 +87,10 @@ impeller_component("impellerc") {
}

group("compiler") {
deps = [ ":impellerc" ]
deps = [
":impellerc",
":impellerc_license",
]
}

impeller_component("compiler_unittests") {
Expand Down
6 changes: 3 additions & 3 deletions tools/font-subset/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ generated_file("_font-subset-license") {
license_path =
rebase_path("//flutter/sky/packages/sky_engine/LICENSE", "//flutter")
git_url = "https://github.com/flutter/engine/tree/$engine_version"
outputs = [ "$target_gen_dir/README.md" ]
outputs = [ "$target_gen_dir/LICENSE.font-subset.md" ]
contents = [
"# font-subset",
"",
Expand Down Expand Up @@ -64,8 +64,8 @@ zip_bundle("font-subset") {
destination = "const_finder.dart.snapshot"
},
{
source = "$target_gen_dir/README.md"
destination = "README.md"
source = "$target_gen_dir/LICENSE.font-subset.md"
destination = "LICENSE.font-subset.md"
},
]

Expand Down
6 changes: 3 additions & 3 deletions tools/licenses/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1916,14 +1916,14 @@ class _RepositoryRootThirdPartyDirectory extends _RepositoryGenericThirdPartyDir
&& entry.name != 'skia' // treated as a separate component
&& entry.name != 'fontconfig' // not used in standard configurations
&& entry.name != 'swiftshader' // only used on hosts for tests
&& entry.name != 'shaderc' // only used on hosts for tests
&& entry.name != 'shaderc' // Used by impellerc with separate license and host tests. See //flutter/impeller/compiler:impellerc_license
&& entry.name != 'glslang' // only used on hosts for tests
&& entry.name != 'spirv_tools' // only used on hosts for tests
&& entry.name != 'spirv_headers' // only used on hosts for tests
&& entry.name != 'spirv_cross' // only used on hosts for tests
&& entry.name != 'spirv_cross' // Used by impellerc with separate license and host tests. See //flutter/impeller/compiler:impellerc_license
&& entry.name != 'ocmock' // only used for tests
&& entry.name != 'java' // only used for Android builds
&& entry.name != 'inja' // only used on hosts for builds
&& entry.name != 'inja' // Only used by impellerc, which ships a separate license. See //flutter/impeller/compiler:impellerc_license
&& super.shouldRecurse(entry);
}

Expand Down

0 comments on commit 1931ec4

Please sign in to comment.