diff --git a/ci/licenses_golden/tool_signature b/ci/licenses_golden/tool_signature index f03d66c4eed99..d70c670c0f91c 100644 --- a/ci/licenses_golden/tool_signature +++ b/ci/licenses_golden/tool_signature @@ -1,2 +1,2 @@ -Signature: 96de64fbd5966f7a30ec61d47d1ac204 +Signature: 2b69b9b3b985d18a9c148d38f9cefb46 diff --git a/impeller/compiler/BUILD.gn b/impeller/compiler/BUILD.gn index 1ef64be8f7735..c07167d7770d0 100644 --- a/impeller/compiler/BUILD.gn +++ b/impeller/compiler/BUILD.gn @@ -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 = [ @@ -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" @@ -46,7 +87,10 @@ impeller_component("impellerc") { } group("compiler") { - deps = [ ":impellerc" ] + deps = [ + ":impellerc", + ":impellerc_license", + ] } impeller_component("compiler_unittests") { diff --git a/tools/font-subset/BUILD.gn b/tools/font-subset/BUILD.gn index 6399e0f53a97f..e12e3025bb54b 100644 --- a/tools/font-subset/BUILD.gn +++ b/tools/font-subset/BUILD.gn @@ -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", "", @@ -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" }, ] diff --git a/tools/licenses/lib/main.dart b/tools/licenses/lib/main.dart index 8bf1e59246d0a..bb8f5de63f56d 100644 --- a/tools/licenses/lib/main.dart +++ b/tools/licenses/lib/main.dart @@ -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); }