Skip to content

Commit

Permalink
Cludge to prevent .so from being a data_dep in resource_whitelist
Browse files Browse the repository at this point in the history
BUG=748113

Change-Id: I9aa6fa7cc0f8b7e4c84d0eea11686033ebf45e6e
Reviewed-on: https://chromium-review.googlesource.com/584170
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#489338}
  • Loading branch information
agrieve authored and Commit Bot committed Jul 25, 2017
1 parent 2a1699a commit 8e65260
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
3 changes: 1 addition & 2 deletions tools/resources/OWNERS
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
per-file generate_resource_whitelist.*=agrieve@chromium.org
agrieve@chromium.org
per-file generate_resource_whitelist.*=estevenson@chromium.org
per-file filter_resource_whitelist.*=agrieve@chromium.org
per-file filter_resource_whitelist.*=zpeng@chromium.org
7 changes: 7 additions & 0 deletions tools/resources/dummy.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

int main(int argc, char**argv) {
return 0;
}
17 changes: 12 additions & 5 deletions tools/resources/generate_resource_whitelist.gni
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,24 @@
# output = "$target_gen_dir/pak_whitelist.txt"
# }
template("generate_resource_whitelist") {
action(target_name) {
# Wrap the shared_library in an executable so that it does not get added
# as a data_dep.
# TODO(crbug/748113): Remove once GN has a way to specify compile-only deps.
executable("${target_name}__exec") {
forward_variables_from(invoker, [ "deps" ])
sources = [
"//tools/resources/dummy.c",
]
}
action(target_name) {
deps = [
":${target_name}__exec",
]
assert(is_android,
"Resource whitelist currently implemented only on Android")

script = "//tools/resources/generate_resource_whitelist.py"

inputs = [
invoker.input,
]

outputs = [
invoker.output,
]
Expand Down

0 comments on commit 8e65260

Please sign in to comment.