Commit 946969b8 authored by Vladislav Kuzkokov's avatar Vladislav Kuzkokov Committed by Commit Bot

[Printing] Limit IPP attributes generation to CrOS.

Avoid generation on platforms that don't use it.

Bug: 964919
Change-Id: Iacba48977c6f9eb089f41dd5409e33f1fad222e7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1954013Reviewed-by: default avatarLei Zhang <thestig@chromium.org>
Commit-Queue: Vladislav Kuzkokov <vkuzkokov@chromium.org>
Cr-Commit-Position: refs/heads/master@{#722518}
parent 7ff73bd5
......@@ -30,21 +30,23 @@ source_set("printing_export") {
]
}
attributes_path = "backend/tools/ipp-registrations-2.csv"
ipp_handler_map_path = "$target_gen_dir/backend/ipp_handler_map.cc"
action("ipp_code_generate") {
script = "backend/tools/code_generator.py"
inputs = [
attributes_path,
]
outputs = [
ipp_handler_map_path,
]
args = [
"--attributes-file=" + rebase_path(attributes_path, root_build_dir),
"--ipp-handler-map=" + rebase_path(ipp_handler_map_path, root_build_dir),
]
if (use_cups && is_chromeos) {
attributes_path = "backend/tools/ipp-registrations-2.csv"
ipp_handler_map_path = "$target_gen_dir/backend/ipp_handler_map.cc"
action("ipp_code_generate") {
script = "backend/tools/code_generator.py"
inputs = [
attributes_path,
]
outputs = [
ipp_handler_map_path,
]
args = [
"--attributes-file=" + rebase_path(attributes_path, root_build_dir),
"--ipp-handler-map=" + rebase_path(ipp_handler_map_path, root_build_dir),
]
}
}
component("printing") {
......@@ -107,7 +109,6 @@ component("printing") {
"//printing/buildflags",
]
deps = [
":ipp_code_generate",
":printing_export",
"//base",
"//base:i18n",
......@@ -197,6 +198,8 @@ component("printing") {
defines += [ "PRINT_BACKEND_AVAILABLE" ]
if (is_chromeos) {
deps += [ ":ipp_code_generate" ]
sources += [
"backend/cups_connection.cc",
"backend/cups_connection.h",
......
......@@ -18,6 +18,8 @@ def get_handler(syntax, name):
# IPP enums always use positive numbers so we can use 0 in other cases.
default = 3 if name.endswith('finishings') else 0
return 'MultivalueEnumHandler, %d' % default
# TODO(crbug.com/964919): Add other multivalue handlers
return ''
if syntax == 'collection':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment