| OLD | NEW |
| 1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import("//build/config/sanitizers/sanitizers.gni") | 5 import("//build/config/sanitizers/sanitizers.gni") |
| 6 import("//build/toolchain/goma.gni") | 6 import("//build/toolchain/goma.gni") |
| 7 | 7 |
| 8 declare_args() { | 8 declare_args() { |
| 9 # The platform on which the instrumented libraries are being built. | 9 # The platform on which the instrumented libraries are being built. |
| 10 instrumented_libraries_platform = "trusty" | 10 instrumented_libraries_platform = "trusty" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 } | 50 } |
| 51 | 51 |
| 52 if (is_msan) { | 52 if (is_msan) { |
| 53 if (msan_track_origins == 0) { | 53 if (msan_track_origins == 0) { |
| 54 archive_prefix = "msan-no-origins" | 54 archive_prefix = "msan-no-origins" |
| 55 } else if (msan_track_origins == 2) { | 55 } else if (msan_track_origins == 2) { |
| 56 archive_prefix = "msan-chained-origins" | 56 archive_prefix = "msan-chained-origins" |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 | 59 |
| 60 action("download_prebuilt_instrumented_libraries") { | 60 # TODO(GYP): scripts/download_binaries.py uses GYP_DEFINES to decide whether |
| 61 tarfile_name = "$archive_prefix-$instrumented_libraries_platform.tgz" | 61 # to download the archives extracted here. |
| 62 shafile = "binaries/$tarfile_name.sha1" | |
| 63 tarfile = "$target_out_dir/$tarfile_name" | |
| 64 inputs = [ shafile ] | |
| 65 outputs = [ tarfile ] | |
| 66 script = "scripts/download_binaries.py" | |
| 67 args = [ rebase_path(shafile), rebase_path(tarfile) ] | |
| 68 } | |
| 69 | |
| 70 # Note: This requires a clobber whenever Ubuntu version changes. | 62 # Note: This requires a clobber whenever Ubuntu version changes. |
| 71 action("extract_prebuilt_instrumented_libraries") { | 63 action("extract_prebuilt_instrumented_libraries") { |
| 72 deps = [ ":download_prebuilt_instrumented_libraries" ] | |
| 73 visibility = [ ":prebuilt" ] | 64 visibility = [ ":prebuilt" ] |
| 74 script = "scripts/unpack_binaries.py" | 65 script = "scripts/unpack_binaries.py" |
| 75 depfile = "$target_out_dir/$archive_prefix.d" | 66 depfile = "$target_out_dir/$archive_prefix.d" |
| 76 tarfile = get_target_outputs(":download_prebuilt_instrumented_libraries") | |
| 77 args = [ | 67 args = [ |
| 78 rebase_path(tarfile[0]), | 68 archive_prefix, |
| 79 rebase_path("$target_out_dir/$archive_prefix.txt"), | 69 rebase_path("binaries"), |
| 80 rebase_path(root_out_dir + "/instrumented_libraries_prebuilt"), | 70 rebase_path(root_out_dir + "/instrumented_libraries_prebuilt"), |
| 71 rebase_path(target_out_dir, root_out_dir), |
| 81 ] | 72 ] |
| 82 outputs = [ | 73 outputs = [ |
| 83 "$target_out_dir/$archive_prefix.txt", | 74 "$target_out_dir/$archive_prefix.txt", |
| 84 ] | 75 ] |
| 85 data = [ | 76 data = [ |
| 86 "$root_out_dir/instrumented_libraries_prebuilt/", | 77 "$root_out_dir/instrumented_libraries_prebuilt/", |
| 87 ] | 78 ] |
| 88 } | 79 } |
| 89 | 80 |
| 90 config("prebuilt_ldflags") { | 81 config("prebuilt_ldflags") { |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 "--disable-gudev", | 804 "--disable-gudev", |
| 814 ] | 805 ] |
| 815 pre_build = "scripts/pre-build/udev.sh" | 806 pre_build = "scripts/pre-build/udev.sh" |
| 816 } | 807 } |
| 817 | 808 |
| 818 instrumented_library("zlib1g") { | 809 instrumented_library("zlib1g") { |
| 819 # --disable-static is not supported | 810 # --disable-static is not supported |
| 820 patch = "patches/zlib1g.diff" | 811 patch = "patches/zlib1g.diff" |
| 821 } | 812 } |
| 822 } | 813 } |
| OLD | NEW |