tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

BUILD.gn (1490B)


      1 # Copyright 2023 The Chromium Authors
      2 # Use of this source code is governed by a BSD-style license that can be
      3 # found in the LICENSE file.
      4 
      5 import("//chromium/build/config/python.gni")
      6 import("//build_overrides/build.gni")
      7 import("private_code_test.gni")
      8 
      9 testonly = true
     10 
     11 action("private_paths") {
     12   script = "list_gclient_deps.py"
     13   outputs = [ "$target_gen_dir/private_paths.txt" ]
     14   args = [
     15     "--source-filter",
     16     "chrome-internal",
     17     "--output",
     18     rebase_path(outputs[0], root_build_dir),
     19   ]
     20   inputs = [ "//../.gclient_entries" ]
     21 }
     22 
     23 # --collect-inputs-only requires a source_set dep or !is_component_build.
     24 if (!is_component_build) {
     25   action("private_code_test_gclient_deps") {
     26     script = "list_gclient_deps.py"
     27     outputs = [ "$target_gen_dir/test_private_paths.txt" ]
     28     args = [
     29       "--source-filter",
     30       "v8.git",
     31       "--output",
     32       rebase_path(outputs[0], root_build_dir),
     33     ]
     34     inputs = [ "//../.gclient_entries" ]
     35   }
     36 
     37   shared_library("private_code_test_inputs") {
     38     deps = [ "//v8" ]
     39 
     40     # This is unnecessary, but used to make this test-only target
     41     # lighter-weight.
     42     ldflags = [ "--collect-inputs-only" ]
     43   }
     44 
     45   # Test that ensures the checker fails when it is supposed to.
     46   private_code_test("private_code_failure_test") {
     47     linker_inputs_dep = ":private_code_test_inputs"
     48     private_paths_dep = ":private_code_test_gclient_deps"
     49     private_paths_file = "$target_gen_dir/test_private_paths.txt"
     50     expect_failure = true
     51   }
     52 }