Commit 474cba11 authored by Sylvain Defresne's avatar Sylvain Defresne Committed by Commit Bot

[ios] Silence warning from closure compiler until dep can be rolled

The warning is benign (warn about an empty block protected by an if)
but cause Xcode 12.0+ to consider the build as a failure (as soon as
the output contains the string "error", Xcode consider the build as
a failure).

Silence the warning until the dependency can be rolled (currently
blocked by the fact that mirroring from github is misconfigured).

Bug: 1129390, 1129393
Change-Id: I170de8cac0fa88612bac157737f7abd2fbfa4989
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2416273
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#807904}
parent 4b5732c0
...@@ -583,6 +583,10 @@ js_compile_bundle("main_frame_web_bundle") { ...@@ -583,6 +583,10 @@ js_compile_bundle("main_frame_web_bundle") {
visibility = [ ":js_resources" ] visibility = [ ":js_resources" ]
closure_entry_point = "__crWeb.mainFrameWebBundle" closure_entry_point = "__crWeb.mainFrameWebBundle"
# Silence warning when compiling text-fragment-utils.js until the code
# has been rolled (see https://crbug.com/1129390).
suppressed_warnings = [ "uselessCode" ]
sources = [ sources = [
"//third_party/text-fragments-polyfill/src/src/text-fragment-utils.js", "//third_party/text-fragments-polyfill/src/src/text-fragment-utils.js",
"web_state/js/resources/error.js", "web_state/js/resources/error.js",
......
...@@ -24,6 +24,9 @@ closure_compiler_path = "//third_party/closure_compiler/compiler/compiler.jar" ...@@ -24,6 +24,9 @@ closure_compiler_path = "//third_party/closure_compiler/compiler/compiler.jar"
# deps (optional) # deps (optional)
# List of targets required by this target. # List of targets required by this target.
# #
# suppressed_warnings (optional)
# List of warnings to suppress.
#
# visibility (optional) # visibility (optional)
# Visibility restrictions. # Visibility restrictions.
# #
...@@ -49,7 +52,14 @@ template("js_compile_bundle") { ...@@ -49,7 +52,14 @@ template("js_compile_bundle") {
sources = invoker.sources sources = invoker.sources
outputs = [ "$target_gen_dir/$_target_name.js" ] outputs = [ "$target_gen_dir/$_target_name.js" ]
args = [ _additional_args = []
if (defined(invoker.suppressed_warnings)) {
foreach(_suppressed_warning, invoker.suppressed_warnings) {
_additional_args += [ "--jscomp_off=$_suppressed_warning" ]
}
}
args = _additional_args + [
"--compilation_level", "--compilation_level",
"SIMPLE_OPTIMIZATIONS", "SIMPLE_OPTIMIZATIONS",
"--js_output_file", "--js_output_file",
......
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