From 9f565bdd896f6fff41f6ad8b0ecfc638ff0373c3 Mon Sep 17 00:00:00 2001 From: Roland McGrath <mcgrathr@google.com> Date: Sat, 11 May 2019 13:32:54 +0000 Subject: [PATCH] [zircon] Use shared libc++ in Zircon Bug: ZX-1751 #comment Full libc++ use now available in Zircon. Change-Id: I3f2f7e2e9a8f81129d27374e6e396a75586f6774 --- zircon/kernel/lib/userboot/user/BUILD.gn | 3 +- zircon/public/gn/BUILDCONFIG.gn | 11 +- zircon/public/gn/config/BUILD.gn | 32 +++- .../public/gn/config/instrumentation/BUILD.gn | 80 ++++------ .../instrumentation/runtime-manifest.sh | 20 --- zircon/public/gn/config/libc-dummy/libc++.so | 4 - .../public/gn/config/libc-dummy/libstdc++.so | 2 + zircon/public/gn/config/standard.gni | 12 +- zircon/public/gn/manifest-cat.sh | 28 ++++ zircon/public/gn/manifest.gni | 138 +++++++++++++----- zircon/public/gn/toolchain/clang.gni | 64 ++++++++ .../public/gn/toolchain/toolchain-manifest.sh | 24 +++ zircon/system/core/bootsvc/BUILD.gn | 3 - .../core/devmgr/devcoordinator/BUILD.gn | 3 - zircon/system/core/devmgr/fshost/BUILD.gn | 3 - zircon/system/core/miscsvc/BUILD.gn | 1 - zircon/system/core/netsvc/BUILD.gn | 1 - zircon/system/core/pwrbtn-monitor/BUILD.gn | 1 - zircon/system/core/svchost/BUILD.gn | 1 - zircon/system/core/virtcon/BUILD.gn | 2 - zircon/system/dev/backlight/sg-micro/BUILD.gn | 1 - zircon/system/dev/block/ahci/BUILD.gn | 1 - zircon/system/dev/block/ftl/test/BUILD.gn | 2 - zircon/system/dev/block/fvm/test/BUILD.gn | 1 - zircon/system/dev/block/mtk-sdmmc/BUILD.gn | 1 - zircon/system/dev/block/sdmmc/BUILD.gn | 1 - .../dev/block/usb-mass-storage/BUILD.gn | 2 - .../dev/bluetooth/bt-hci-mediatek/BUILD.gn | 1 - zircon/system/dev/board/mt8167s_ref/BUILD.gn | 1 - zircon/system/dev/bus/pci/BUILD.gn | 1 - zircon/system/dev/bus/virtio/BUILD.gn | 1 - zircon/system/dev/clk/amlogic-clk/BUILD.gn | 1 - zircon/system/dev/clk/msm8x53-clk/BUILD.gn | 1 - .../dev/display/mt8167s-display/BUILD.gn | 1 - zircon/system/dev/gpio/as370-gpio/BUILD.gn | 1 - zircon/system/dev/gpio/mt-8167/BUILD.gn | 1 - zircon/system/dev/gpio/qcom-gpio/BUILD.gn | 1 - zircon/system/dev/i2c/mt8167-i2c/BUILD.gn | 1 - zircon/system/dev/input/bma253/BUILD.gn | 1 - zircon/system/dev/lib/scsi/BUILD.gn | 1 - .../system/dev/light-sensor/lite-on/BUILD.gn | 1 - zircon/system/dev/nand/broker/test/BUILD.gn | 2 - zircon/system/dev/nand/nand/test/BUILD.gn | 1 - zircon/system/dev/nand/nandpart/BUILD.gn | 1 - zircon/system/dev/nand/ram-nand/BUILD.gn | 1 - zircon/system/dev/nand/skip-block/BUILD.gn | 1 - .../system/dev/power/msm8x53-power/BUILD.gn | 1 - zircon/system/dev/power/mtk-power/BUILD.gn | 1 - zircon/system/dev/sysmem/sysmem/BUILD.gn | 1 - zircon/system/dev/test/operation/BUILD.gn | 1 - zircon/system/dev/test/usb/BUILD.gn | 1 - .../system/dev/thermal/mtk-thermal/BUILD.gn | 1 - zircon/system/dev/usb/mt-musb-host/BUILD.gn | 1 - zircon/system/uapp/aslr-analysis/BUILD.gn | 1 - zircon/system/uapp/audio/BUILD.gn | 1 - zircon/system/uapp/biotime/BUILD.gn | 1 - zircon/system/uapp/blobfs/BUILD.gn | 1 - zircon/system/uapp/channel-perf/BUILD.gn | 1 - zircon/system/uapp/crasher/BUILD.gn | 1 - zircon/system/uapp/disk-pave/BUILD.gn | 2 - zircon/system/uapp/display-test/BUILD.gn | 1 - zircon/system/uapp/fvm-check/BUILD.gn | 1 - .../system/uapp/goldfish-benchmark/BUILD.gn | 1 - zircon/system/uapp/gpt/BUILD.gn | 1 - zircon/system/uapp/hid/BUILD.gn | 1 - zircon/system/uapp/ihda/BUILD.gn | 1 - zircon/system/uapp/iochk/BUILD.gn | 1 - zircon/system/uapp/kcounter/BUILD.gn | 1 - zircon/system/uapp/kstress/BUILD.gn | 1 - zircon/system/uapp/ktrace/BUILD.gn | 1 - zircon/system/uapp/light/BUILD.gn | 1 - zircon/system/uapp/loadgen/BUILD.gn | 1 - zircon/system/uapp/lsblk/BUILD.gn | 1 - zircon/system/uapp/lspwr/BUILD.gn | 1 - zircon/system/uapp/minfs/BUILD.gn | 1 - zircon/system/uapp/nand-loader/BUILD.gn | 1 - zircon/system/uapp/nand-util/BUILD.gn | 2 - zircon/system/uapp/psutils/BUILD.gn | 2 - zircon/system/uapp/runtests/BUILD.gn | 1 - zircon/system/uapp/thermal-cli/BUILD.gn | 1 - zircon/system/uapp/trace-benchmark/BUILD.gn | 1 - zircon/system/uapp/trace-example/BUILD.gn | 1 - zircon/system/uapp/usb-fwloader/BUILD.gn | 1 - zircon/system/uapp/waitfor/BUILD.gn | 1 - zircon/system/uapp/xdc-test/BUILD.gn | 1 - zircon/system/ulib/async-loop/test/BUILD.gn | 1 - zircon/system/ulib/async/test/BUILD.gn | 1 - zircon/system/ulib/blobfs/test/BUILD.gn | 1 - zircon/system/ulib/bootfs/BUILD.gn | 1 - .../system/ulib/cobalt-client/test/BUILD.gn | 1 - zircon/system/ulib/ddk/BUILD.gn | 1 - zircon/system/ulib/digest/test/BUILD.gn | 1 - .../system/ulib/disk-inspector/test/BUILD.gn | 1 - .../driver-integration-test/test/BUILD.gn | 1 - zircon/system/ulib/fvm/test/BUILD.gn | 1 - zircon/system/ulib/gpt/test/BUILD.gn | 1 - zircon/system/ulib/id_allocator/test/BUILD.gn | 1 - zircon/system/ulib/io-scheduler/BUILD.gn | 1 - .../system/ulib/minfs/allocator/test/BUILD.gn | 1 - zircon/system/ulib/minfs/test/BUILD.gn | 2 - zircon/system/ulib/paver/BUILD.gn | 1 - zircon/system/ulib/simplehid/test/BUILD.gn | 1 - .../system/ulib/storage-metrics/test/BUILD.gn | 1 - zircon/system/ulib/tftp/BUILD.gn | 1 - zircon/system/ulib/trace-vthread/BUILD.gn | 2 - zircon/system/ulib/zbi-bootfs/test/BUILD.gn | 1 - zircon/system/ulib/zircon/BUILD.gn | 33 ++++- zircon/system/ulib/zxtest/test/BUILD.gn | 1 - .../ulib/zxtest/test/integration/BUILD.gn | 1 - zircon/system/utest/async-testutils/BUILD.gn | 1 - zircon/system/utest/biotime/BUILD.gn | 1 - zircon/system/utest/bitmap/BUILD.gn | 1 - zircon/system/utest/blobfs-bench/BUILD.gn | 1 - zircon/system/utest/blobfs/BUILD.gn | 1 - .../system/utest/chromeos-disk-setup/BUILD.gn | 1 - zircon/system/utest/cobalt-client/BUILD.gn | 1 - zircon/system/utest/core/BUILD.gn | 2 - zircon/system/utest/crypto/BUILD.gn | 1 - zircon/system/utest/ctor/BUILD.gn | 2 - zircon/system/utest/devfs/BUILD.gn | 1 - .../system/utest/device-enumeration/BUILD.gn | 1 - zircon/system/utest/driver-test/BUILD.gn | 1 - zircon/system/utest/elf-search/BUILD.gn | 1 - zircon/system/utest/entropy/BUILD.gn | 1 - zircon/system/utest/ethernet/BUILD.gn | 1 - zircon/system/utest/fbl/BUILD.gn | 1 - zircon/system/utest/fdio/BUILD.gn | 1 - .../system/utest/fidl-coding-tables/BUILD.gn | 1 - .../system/utest/fidl-llcpp-interop/BUILD.gn | 1 - zircon/system/utest/fidl-simple/BUILD.gn | 1 - zircon/system/utest/fidl/BUILD.gn | 2 - zircon/system/utest/fit/BUILD.gn | 1 - zircon/system/utest/fs-bench/BUILD.gn | 1 - zircon/system/utest/fs-management/BUILD.gn | 1 - zircon/system/utest/fs-recovery/BUILD.gn | 1 - zircon/system/utest/fs-test-utils/BUILD.gn | 1 - zircon/system/utest/fs-vnode/BUILD.gn | 1 - zircon/system/utest/fs/BUILD.gn | 1 - zircon/system/utest/futex-ownership/BUILD.gn | 1 - zircon/system/utest/fvm/BUILD.gn | 1 - zircon/system/utest/fzl/BUILD.gn | 1 - zircon/system/utest/goldfish/BUILD.gn | 1 - zircon/system/utest/hid-parser/BUILD.gn | 1 - zircon/system/utest/hid/BUILD.gn | 2 - zircon/system/utest/hypervisor/BUILD.gn | 1 - zircon/system/utest/inspect-vmo/BUILD.gn | 1 - zircon/system/utest/kcounter/BUILD.gn | 1 - zircon/system/utest/launchpad/BUILD.gn | 1 - zircon/system/utest/libfzl/BUILD.gn | 1 - zircon/system/utest/log/BUILD.gn | 1 - zircon/system/utest/logger/BUILD.gn | 1 - zircon/system/utest/memfs/BUILD.gn | 1 - zircon/system/utest/miscsvc/BUILD.gn | 1 - zircon/system/utest/perftest/BUILD.gn | 1 - zircon/system/utest/platform-bus/BUILD.gn | 1 - zircon/system/utest/ramdisk/BUILD.gn | 1 - zircon/system/utest/region-alloc/BUILD.gn | 1 - zircon/system/utest/runtests-utils/BUILD.gn | 1 - zircon/system/utest/sysinfo/BUILD.gn | 1 - zircon/system/utest/sysmem/BUILD.gn | 1 - zircon/system/utest/task-utils/BUILD.gn | 1 - zircon/system/utest/trace-reader/BUILD.gn | 1 - zircon/system/utest/trace/BUILD.gn | 2 - zircon/system/utest/usb-virtual-bus/BUILD.gn | 1 - zircon/system/utest/utf_conversion/BUILD.gn | 1 - zircon/system/utest/vdso/BUILD.gn | 1 - zircon/system/utest/virtio/BUILD.gn | 1 - zircon/system/utest/virtual_camera/BUILD.gn | 1 - zircon/system/utest/zbi/BUILD.gn | 1 - zircon/system/utest/zxcrypt/BUILD.gn | 1 - 170 files changed, 315 insertions(+), 313 deletions(-) delete mode 100755 zircon/public/gn/config/instrumentation/runtime-manifest.sh delete mode 100644 zircon/public/gn/config/libc-dummy/libc++.so create mode 100644 zircon/public/gn/config/libc-dummy/libstdc++.so create mode 100755 zircon/public/gn/manifest-cat.sh create mode 100755 zircon/public/gn/toolchain/toolchain-manifest.sh diff --git a/zircon/kernel/lib/userboot/user/BUILD.gn b/zircon/kernel/lib/userboot/user/BUILD.gn index 1486923e232..91a9b611c0f 100644 --- a/zircon/kernel/lib/userboot/user/BUILD.gn +++ b/zircon/kernel/lib/userboot/user/BUILD.gn @@ -35,8 +35,9 @@ if (current_toolchain == default_toolchain) { # Everything in userboot gets compiled this way. config("userboot_config") { configs = [ - "$zx/public/gn/config:no_sanitizers", "$zx/public/gn/config:user", + "$zx/public/gn/config:static-libc++", + "$zx/public/gn/config:no_sanitizers", ] cflags = [ diff --git a/zircon/public/gn/BUILDCONFIG.gn b/zircon/public/gn/BUILDCONFIG.gn index 43e2b91cef4..a287ce86a8b 100644 --- a/zircon/public/gn/BUILDCONFIG.gn +++ b/zircon/public/gn/BUILDCONFIG.gn @@ -131,8 +131,15 @@ template("_shlib_toolchain_target") { # and mutators. See environment(). if (dep == "$dep") { deps += [ dep ] - } else if (!defined(dep.types) || dep.types + [ invoker.match ] - - [ invoker.match ] != dep.types) { + } else if (defined(dep.types) && dep.types + [ invoker.match ] - + [ invoker.match ] == dep.types) { + # The types list doesn't include this target's type, so skip this + # element. + } else if (defined(dep.unless_configs) && configs + dep.unless_configs - + dep.unless_configs != configs) { + # Something in the unless_configs list is in this target's configs, + # so skip this element. + } else { deps += dep.add deps -= dep.remove } diff --git a/zircon/public/gn/config/BUILD.gn b/zircon/public/gn/config/BUILD.gn index 5b79a563863..bb114a3ea1d 100644 --- a/zircon/public/gn/config/BUILD.gn +++ b/zircon/public/gn/config/BUILD.gn @@ -3,6 +3,7 @@ # found in the LICENSE file. import("$zx/public/gn/config/standard.gni") +import("$zx/public/gn/toolchain/clang.gni") import("levels.gni") declare_args() { @@ -226,16 +227,23 @@ config("relative_paths") { ldflags = compiler_flags } -config("nostdlib") { - # Don't actually use -nostdlib, because the builtins (or libgcc) are what - # we want and are otherwise annoying to find and specify. It's just the - # -lc (and -lc++) that we really want to defeat, and that's handled by - # giving a -L that will find exactly nothing but a dummy libc.so. +config("nolibc") { ldflags = [ "-nostartfiles" ] + + # Don't use -nostdlib, because the builtins (or libgcc) are what we want + # and are otherwise annoying to find and specify. It's just the -lc that + # we really want to defeat, and that's handled by giving a -L that will + # find exactly nothing but a dummy libc.so. Clang has -nolibc to kill + # the -lc, but for C++ it still uses -lm under -nolibc. So this is still + # needed to make -lm into a dummy, though for -lc only GCC needs it. lib_dirs = [ "libc-dummy" ] + if (is_gcc) { # Include this in every link. libs = [ "$zx/scripts/dso_handle.ld" ] + } else { + # TODO(mcgrathr): GCC 9 has -nolibc, so use it when we get that toolchain. + ldflags += [ "-nolibc" ] } } @@ -517,7 +525,10 @@ config("machine") { config("user") { defines = [ "_ALL_SOURCE" ] - configs = [ "$zx/third_party/ulib/musl:headers" ] + configs = [ + ":nolibc", + "$zx/third_party/ulib/musl:headers", + ] } config("user_executable") { @@ -571,6 +582,15 @@ config("static-libc++") { } } +if (is_fuchsia) { + toolchain_manifest("shared-libcxx-deps") { + args = [] + foreach(soname, libcxx_dt_needed) { + args += [ "lib/${toolchain.libprefix}${soname}" ] + } + } +} + config("rodso") { if (is_gcc) { inputs = [ diff --git a/zircon/public/gn/config/instrumentation/BUILD.gn b/zircon/public/gn/config/instrumentation/BUILD.gn index df0bfcff1e7..f0310518ec7 100644 --- a/zircon/public/gn/config/instrumentation/BUILD.gn +++ b/zircon/public/gn/config/instrumentation/BUILD.gn @@ -2,6 +2,8 @@ # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. +import("$zx/public/gn/toolchain/clang.gni") + declare_args() { # Default [AddressSanitizer](https://llvm.org/docs/AddressSanitizer.html) # options (before the `ASAN_OPTIONS` environment variable is read at @@ -13,52 +15,6 @@ declare_args() { asan_default_options = "" } -# Define a group() to be used in implicit_deps for a variant with runtime DSOs. -# -# Parameters -# -# args -# - Required: List of regexps to match in the toolchain manifest file. -# - Type: list(string) -# -template("clang_runtime_deps") { - if (is_fuchsia) { - deps_target = target_name - manifest_target = "_clang_runtime_deps.$target_name.manifest" - manifest_file = "$target_gen_dir/$target_name.manifest" - - # TODO(TC-366): Ideally we'd get JSON from the toolchain that we could - # massage directly here into a resource() target or the like. - action(manifest_target) { - visibility = [ ":$deps_target" ] - script = "runtime-manifest.sh" - outputs = [ - manifest_file, - ] - sources = [ - "${toolchain.tool_dir}/../lib/${toolchain.target_tuple}.manifest", - ] - args = rebase_path(sources + outputs, root_build_dir) + invoker.args - } - } else { - not_needed(invoker, [ "args" ]) - } - - group(target_name) { - if (is_fuchsia) { - deps = [ - ":$manifest_target", - ] - metadata = { - zbi_input_args = [ - "--files", - rebase_path(manifest_file, root_build_dir), - ] - } - } - } -} - config("asan") { compiler_flags = [ "-fsanitize=address" ] asmflags = compiler_flags @@ -82,8 +38,18 @@ source_set("asan_default_options") { # This is included in ${toolchain.implicit_deps} for asan variants. It # ensures that the runtime library is visible in the filesystem image. -clang_runtime_deps("asan_deps") { - args = [ "asan" ] +if (is_fuchsia) { + toolchain_manifest("asan_deps") { + # TODO(TC-366): Ideally we'd get JSON from the toolchain that we could + # massage directly here into a resource() target or the like. + args = [ "lib/libclang_rt.asan.so" ] + foreach(soname, libcxxabi_dt_needed) { + args += [ "lib/asan/${soname}" ] + } + } +} else { + group("asan_deps") { + } } config("ubsan") { @@ -95,12 +61,18 @@ config("ubsan") { # This is included in ${toolchain.implicit_deps} for ubsan variants. It # ensures that the runtime library is visible in the filesystem image. -clang_runtime_deps("ubsan_deps") { - args = [ - "ubsan", - "lib[/]libc[+][+]abi[.]so", - "lib[/]libunwind[.]so", - ] +if (is_fuchsia) { + toolchain_manifest("ubsan_deps") { + # TODO(TC-366): Ideally we'd get JSON from the toolchain that we could + # massage directly here into a resource() target or the like. + args = [ "lib/libclang_rt.ubsan_standalone.so" ] + foreach(soname, libcxxabi_dt_needed) { + args += [ "lib/${soname}" ] + } + } +} else { + group("ubsan_deps") { + } } # NOTE: Every variant that includes any sancov configs must have "sancov" diff --git a/zircon/public/gn/config/instrumentation/runtime-manifest.sh b/zircon/public/gn/config/instrumentation/runtime-manifest.sh deleted file mode 100755 index 5be37c68e64..00000000000 --- a/zircon/public/gn/config/instrumentation/runtime-manifest.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash -# Copyright 2019 The Fuchsia Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -set -e - -INPUT="$1" -shift -OUTPUT="$1" -shift -manifest_dir="${INPUT%/*}" - -SCRIPT= -for regexp in "$@"; do - SCRIPT+="/$regexp/s@=@=$manifest_dir/@p -" -done - -sed -n "$SCRIPT" "$INPUT" > "$OUTPUT" diff --git a/zircon/public/gn/config/libc-dummy/libc++.so b/zircon/public/gn/config/libc-dummy/libc++.so deleted file mode 100644 index 5b7a5539337..00000000000 --- a/zircon/public/gn/config/libc-dummy/libc++.so +++ /dev/null @@ -1,4 +0,0 @@ -/* - * This is an empty input linker script just to be found as -lc++. - * See $zx/public/gn/config/BUILD.gn:nostdlib. - */ diff --git a/zircon/public/gn/config/libc-dummy/libstdc++.so b/zircon/public/gn/config/libc-dummy/libstdc++.so new file mode 100644 index 00000000000..307e6dcc221 --- /dev/null +++ b/zircon/public/gn/config/libc-dummy/libstdc++.so @@ -0,0 +1,2 @@ +# GCC looks for -lstdc++ but we actually use -lc++. +INPUT ( libc++.so ) diff --git a/zircon/public/gn/config/standard.gni b/zircon/public/gn/config/standard.gni index 0798bc75a08..09faca56581 100644 --- a/zircon/public/gn/config/standard.gni +++ b/zircon/public/gn/config/standard.gni @@ -88,10 +88,7 @@ standard_configs = [ ] # Additional configs apply to code built for Fuchsia but not to host code. -standard_fuchsia_configs = [ - "$zx/public/gn/config:nostdlib", - "$zx/public/gn/config:werror", -] +standard_fuchsia_configs = [ "$zx/public/gn/config:werror" ] # See environment(). These are the environments that are # vanilla bases to make derived environments from. @@ -159,6 +156,13 @@ standard_environments = [ ] add = [ "$zx/system/core/devmgr:driver_deps" ] }, + { + # Unless we're statically linking the C++ standard library, we have + # to assume there will be some link-time references that turn into + # runtime dependencies on the shared libraries. + unless_configs = [ "$zx/public/gn/config:static-libc++" ] + add = [ "$zx/public/gn/config:shared-libcxx-deps" ] + }, ] shlib = true strip = "--strip-sections" diff --git a/zircon/public/gn/manifest-cat.sh b/zircon/public/gn/manifest-cat.sh new file mode 100755 index 00000000000..035be94f575 --- /dev/null +++ b/zircon/public/gn/manifest-cat.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# +# Copyright 2019 The Fuchsia Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This script is used by manifest.gni which see. +# Usage: manifest-cat.sh LISTFILE OUTPUT DEPFILE +# It's just cat with a response file and a dep file. + +set -e + +readonly LISTFILE="$1" +readonly OUTPUT="$2" +readonly DEPFILE="$3" + +readonly FILES=($(<"$LISTFILE")) + +cleanup() { + rm -f "$OUTPUT" "$DEPFILE" +} + +trap cleanup ERR HUP INT TERM +cleanup + +echo "$OUTPUT: $LISTFILE ${FILES[*]}" > "$DEPFILE" + +cat "${FILES[@]}" > "$OUTPUT" diff --git a/zircon/public/gn/manifest.gni b/zircon/public/gn/manifest.gni index 4077e549c84..271b1a16a9c 100644 --- a/zircon/public/gn/manifest.gni +++ b/zircon/public/gn/manifest.gni @@ -30,7 +30,10 @@ # deps # Optional: Dependencies examined for metadata. Transitive dependencies # from here defining `metadata.manifest_lines` contribute to the manifest, -# pruned at targets that set `metadata.manifest_barrier`. +# pruned at targets that set `metadata.manifest_barrier`. Likewise, +# `metadata.manifest_files` contributes manifests (like $sources). +# Each manifest_file() target itself contributes that way, so another +# manifest_file() in the deps will be folded into this one. # Type: list(label) # # output_dir @@ -55,6 +58,10 @@ # with $sources and $outputs like a resource() target. # Type: list(string or scope) # +# sources +# Optional: Additional manifest files to be concatenated onto this one. +# Type: list(file) +# template("manifest_file") { forward_variables_from(invoker, [ @@ -78,71 +85,116 @@ template("manifest_file") { } manifest_target = target_name - file_target = "_manifest_file.$target_name.manifest" + list_file = "$target_gen_dir/$target_name.list" + raw_file = "$target_gen_dir/$target_name.raw.manifest" + list_file_target = "_manifest_file.$target_name.list" + raw_file_target = "_manifest_file.$target_name.raw" - # This target produces the actual manifest file. - generated_file(file_target) { - visibility = [ ":$manifest_target" ] + # An embedded manifest contributes to metadata.manifest_lines directly. + manifest_entries = [] + manifest_inputs = [] + if (defined(invoker.manifest)) { + foreach(entry, invoker.manifest) { + if (entry == "$entry") { + # It's a literal manifest entry string. + # Note this doesn't express any dependency on its source file! + manifest_entries += [ entry ] + } else { + # It's a manifest entry in the style of a copy() target. + foreach(source, entry.sources) { + manifest_inputs += [ source ] + source_path = rebase_path(source, root_build_dir) + foreach(target, process_file_template([ source ], entry.outputs)) { + manifest_entries += [ "${target}=${source_path}" ] + } + } + } + } + } + + # This target produces the raw manifest file from metadata and fixed entries. + generated_file(raw_file_target) { + visibility = [ ":$list_file_target" ] forward_variables_from(invoker, [ "deps", "testonly", ]) outputs = [ - manifest_file, + raw_file, ] output_conversion = "list lines" data_keys = [ "manifest_lines" ] walk_keys = [ "manifest_barrier" ] - - # An embedded manifest contributes to metadata.manifest_lines directly. - if (defined(invoker.manifest)) { - entries = [] - foreach(entry, invoker.manifest) { - if (entry == "$entry") { - # It's a literal manifest entry string. - # Note this doesn't express any dependency on its source file! - entries += [ entry ] - } else { - # It's a manifest entry in the style of a copy() target. - foreach(source, entry.sources) { - inputs += [ source ] - source_path = rebase_path(source, root_build_dir) - foreach(target, process_file_template([ source ], entry.outputs)) { - entries += [ "${target}=${source_path}" ] - } - } - } - } - metadata = { - manifest_lines = entries + metadata = { + # This will be picked up by raw_file_target, below. + manifest_files = rebase_path(outputs, root_build_dir) + if (defined(invoker.sources)) { + manifest_files += rebase_path(invoker.sources, root_build_dir) } + + # This will be picked up by this target's own collection. + manifest_lines = manifest_entries } } - # The metadata collection always starts with the generated_file() target - # itself. That's handy for throwing in extra entries here. But it also - # means that that target can't define `manifest_barrier` metadata because - # that would short-circuit its own collection, not just collections that - # reach it via dependencies. So we always have a group() target wrapping - # the generated_file(). For clarity we pass the invoker's metadata on - # there instead of inside the generated_file() though it doesn't really - # matter for collections; note this means that we allow the invoker to - # define an additional `metadata.manifest_lines` too (though it ought - # to just use `manifest` for that). - group(manifest_target) { + # This target produces the list of manifest files to combine. + # It always includes the raw file just produced and $sources, + # but can also pick up more files from metadata. + generated_file(list_file_target) { + visibility = [ ":$manifest_target" ] + forward_variables_from(invoker, [ "testonly" ]) + outputs = [ + list_file, + ] + output_conversion = "list lines" + data_keys = [ "manifest_files" ] + walk_keys = [ "manifest_barrier" ] + deps = [ + ":$raw_file_target", + ] + } + + # This target produces the final manifest by combining all those files. + # The metadata from the invoker and for other manifest_file() targets + # goes here. It shouldn't be seen by the generated_file() targets above. + action(manifest_target) { forward_variables_from(invoker, [ "data_deps", "testonly", "visibility", ]) + + script = "$zx/public/gn/manifest-cat.sh" + sources = [ + list_file, + ] + outputs = [ + manifest_file, + ] deps = [ - ":$file_target", + ":$list_file_target", ] + inputs = manifest_inputs + if (defined(invoker.sources)) { + # These are listed in $list_file and will appear in the depfile. + # Make sure they're built before the first run if necessary and let + # GN enforce that they come from the deps. This is the only reason + # to include deps and not just data_deps in this action() target. + # The deps are reached by $raw_file_target already. + inputs += invoker.sources + if (defined(invoker.deps)) { + deps += invoker.deps + } + } + depfile = "$manifest_file.d" + args = rebase_path(sources + outputs + [ depfile ], root_build_dir) + metadata = { images = [] manifest_barrier = [] + manifest_files = [] if (defined(invoker.metadata)) { # This lets the invoker add to `images` and `manifest_barrier`, @@ -161,6 +213,12 @@ template("manifest_file") { os = current_os }, ] + + # Another manifest_file() depending on this one will fold it in, + # just as this one folded in any `manifest_files` from its deps. + # The `manifest_barrier` set here (above) prevents any dependents + # from reaching dependencies we've already folded in. + manifest_files += [ rebase_path(manifest_file, root_build_dir) ] } } } diff --git a/zircon/public/gn/toolchain/clang.gni b/zircon/public/gn/toolchain/clang.gni index 2e1c26a5c72..f36b3ab12a1 100644 --- a/zircon/public/gn/toolchain/clang.gni +++ b/zircon/public/gn/toolchain/clang.gni @@ -30,3 +30,67 @@ if (clang_tool_dir == "" && use_prebuilt_clang) { read_file("$_prebuilt_dir/.versions/clang.cipd_version", "json") clang_version_string = _prebuilt_cipd_version.instance_id } + +# TODO(TC-366): Ideally the toolchain itself would emit this info in +# a readable (JSON) form. +libcxxabi_dt_needed = [ + "libc++abi.so.1", + "libunwind.so.1", +] +libcxx_dt_needed = [ "libc++.so.2" ] + libcxxabi_dt_needed + +# Generate a manifest file extracted from the Clang toolchain manifest. +# +# This acts like a manifest_file() target in the dependency graph of +# another manifest_file() target (or a zbi() or zbi_input() target). +# Its contents are extracted from the manifest file supplied by the +# Clang toolchain. +# +# TODO(TC-366): Ideally the toolchain itself would emit this info in a +# GN-readable (i.e. JSON) form. Then this could be a resource() target +# that extracted the file names at gen time. Also it could be keyed by +# things like compiler options (-fsanitize=foo, -stdlib++) to make this +# more generic and e.g. get rid of libcxx_dt_needed. +# +# Parameters +# +# args +# Required: Patterns to match (like sh `case`) in the lhs of the manifest. +# Type: list(string) +# +template("toolchain_manifest") { + if (defined(toolchain.shlib) && current_toolchain != toolchain.shlib) { + not_needed(invoker, [ "args" ]) + group(target_name) { + forward_variables_from(invoker, + [ + "testonly", + "visibility", + ]) + public_deps = [ + ":$target_name(${toolchain.shlib})", + ] + } + } else { + action(target_name) { + forward_variables_from(invoker, + [ + "testonly", + "visibility", + ]) + sources = [ + # Note: Not ${toolchain.tool_dir} here because this might be GCC. + "$clang_tool_dir/../lib/${toolchain.target_tuple}.manifest", + ] + outputs = [ + "$target_gen_dir/$target_name.manifest", + ] + script = "$zx/public/gn/toolchain/toolchain-manifest.sh" + args = rebase_path(sources + outputs, root_build_dir) + invoker.args + metadata = { + # This tells manifest_file() to fold this manifest in. + manifest_files = rebase_path(outputs, root_build_dir) + } + } + } +} diff --git a/zircon/public/gn/toolchain/toolchain-manifest.sh b/zircon/public/gn/toolchain/toolchain-manifest.sh new file mode 100755 index 00000000000..5cf08823879 --- /dev/null +++ b/zircon/public/gn/toolchain/toolchain-manifest.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# Copyright 2019 The Fuchsia Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +set -e + +INPUT="$1" +OUTPUT="$2" +shift 2 + +trap 'rm -f "$OUTPUT"' ERR HUP INT TERM + +manifest_dir="${INPUT%/*}" + +IFS='=' +while read target source; do + for arg in "$@"; do + if [[ "$target" == $arg ]]; then + echo "$target=$manifest_dir/$source" + break + fi + done +done < "$INPUT" > "$OUTPUT" diff --git a/zircon/system/core/bootsvc/BUILD.gn b/zircon/system/core/bootsvc/BUILD.gn index b28e6475242..5cc582b596b 100644 --- a/zircon/system/core/bootsvc/BUILD.gn +++ b/zircon/system/core/bootsvc/BUILD.gn @@ -36,7 +36,6 @@ executable("bootsvc") { "$zx/system/ulib/zx", "$zx/third_party/ulib/lz4", ] - configs += [ "$zx/public/gn/config:static-libc++" ] data_deps = [ "$zx/system/core/devmgr/devcoordinator", @@ -76,7 +75,6 @@ test("bootsvc-unit-test") { "$zx/system/ulib/fbl", "$zx/system/ulib/unittest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } executable("bootsvc-integration-test") { @@ -94,5 +92,4 @@ executable("bootsvc-integration-test") { "$zx/system/ulib/zx", "$zx/third_party/ulib/safemath", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/core/devmgr/devcoordinator/BUILD.gn b/zircon/system/core/devmgr/devcoordinator/BUILD.gn index c12f3c34e8f..9cb207d335b 100644 --- a/zircon/system/core/devmgr/devcoordinator/BUILD.gn +++ b/zircon/system/core/devmgr/devcoordinator/BUILD.gn @@ -25,8 +25,6 @@ executable("devcoordinator") { "$zx/system/core/virtcon:virtual-console", "$zx/system/core/pwrbtn-monitor", ] - - configs += [ "$zx/public/gn/config:static-libc++" ] } source_set("internal-drivers") { @@ -102,5 +100,4 @@ test("devcoordinator-test") { "$zx/system/ulib/zxtest", "../shared:env", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/core/devmgr/fshost/BUILD.gn b/zircon/system/core/devmgr/fshost/BUILD.gn index b08119924f6..67df601ad5c 100644 --- a/zircon/system/core/devmgr/fshost/BUILD.gn +++ b/zircon/system/core/devmgr/fshost/BUILD.gn @@ -77,7 +77,6 @@ executable("fshost") { "$zx/system/ulib/loader-service", "$zx/system/ulib/ramdevice-client", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } test("fshost-test") { @@ -89,7 +88,6 @@ test("fshost-test") { ":fshost-registry", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } test("block-watcher-test") { @@ -104,5 +102,4 @@ test("block-watcher-test") { "$zx/system/ulib/ramdevice-client", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/core/miscsvc/BUILD.gn b/zircon/system/core/miscsvc/BUILD.gn index dafc7c520f6..651e491867b 100644 --- a/zircon/system/core/miscsvc/BUILD.gn +++ b/zircon/system/core/miscsvc/BUILD.gn @@ -14,5 +14,4 @@ executable("miscsvc") { "$zx/system/ulib/svc", "$zx/system/ulib/zircon", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/core/netsvc/BUILD.gn b/zircon/system/core/netsvc/BUILD.gn index ccea687d71c..f827b070d10 100644 --- a/zircon/system/core/netsvc/BUILD.gn +++ b/zircon/system/core/netsvc/BUILD.gn @@ -41,7 +41,6 @@ executable("netsvc") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] data_deps = [ # netsvc launches /boot/bin/install-disk-image under --netboot. "$zx/system/uapp/disk-pave", diff --git a/zircon/system/core/pwrbtn-monitor/BUILD.gn b/zircon/system/core/pwrbtn-monitor/BUILD.gn index 9ca290c23ce..5fc0330b219 100644 --- a/zircon/system/core/pwrbtn-monitor/BUILD.gn +++ b/zircon/system/core/pwrbtn-monitor/BUILD.gn @@ -16,5 +16,4 @@ executable("pwrbtn-monitor") { "$zx/system/ulib/hid-parser", "$zx/system/ulib/zircon", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/core/svchost/BUILD.gn b/zircon/system/core/svchost/BUILD.gn index 58e37487e3f..db49f3bfafd 100644 --- a/zircon/system/core/svchost/BUILD.gn +++ b/zircon/system/core/svchost/BUILD.gn @@ -34,5 +34,4 @@ executable("svchost") { "$zx/system/ulib/sysmem-connector", "$zx/system/ulib/zircon", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/core/virtcon/BUILD.gn b/zircon/system/core/virtcon/BUILD.gn index 112a3d04686..58c9d5054ec 100644 --- a/zircon/system/core/virtcon/BUILD.gn +++ b/zircon/system/core/virtcon/BUILD.gn @@ -51,7 +51,6 @@ executable("virtual-console") { deps = [ ":common", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } test("virtual-console-test") { @@ -65,5 +64,4 @@ test("virtual-console-test") { ":common", "$zx/system/ulib/unittest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/backlight/sg-micro/BUILD.gn b/zircon/system/dev/backlight/sg-micro/BUILD.gn index 0867368a055..45625e89817 100644 --- a/zircon/system/dev/backlight/sg-micro/BUILD.gn +++ b/zircon/system/dev/backlight/sg-micro/BUILD.gn @@ -42,5 +42,4 @@ test("sgm37603a-test") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/block/ahci/BUILD.gn b/zircon/system/dev/block/ahci/BUILD.gn index 1d62e1c68ea..b220ee09e47 100644 --- a/zircon/system/dev/block/ahci/BUILD.gn +++ b/zircon/system/dev/block/ahci/BUILD.gn @@ -25,7 +25,6 @@ test("ahci-unittest") { "$zx/system/ulib/driver", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } source_set("shared") { diff --git a/zircon/system/dev/block/ftl/test/BUILD.gn b/zircon/system/dev/block/ftl/test/BUILD.gn index 24b35c8134a..d862fd8d615 100644 --- a/zircon/system/dev/block/ftl/test/BUILD.gn +++ b/zircon/system/dev/block/ftl/test/BUILD.gn @@ -28,7 +28,6 @@ test("ftl") { "$zx/system/ulib/unittest", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } test("ftl-integration") { @@ -53,5 +52,4 @@ test("ftl-integration") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/block/fvm/test/BUILD.gn b/zircon/system/dev/block/fvm/test/BUILD.gn index 53c40a5d69f..8b9e8c1dfd4 100644 --- a/zircon/system/dev/block/fvm/test/BUILD.gn +++ b/zircon/system/dev/block/fvm/test/BUILD.gn @@ -19,5 +19,4 @@ test("fvm-driver-unittests") { "$zx/system/ulib/zxtest", "..:shared", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/block/mtk-sdmmc/BUILD.gn b/zircon/system/dev/block/mtk-sdmmc/BUILD.gn index 021966b5935..64989c7a7e0 100644 --- a/zircon/system/dev/block/mtk-sdmmc/BUILD.gn +++ b/zircon/system/dev/block/mtk-sdmmc/BUILD.gn @@ -50,5 +50,4 @@ test("mtk-sdmmc-test") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/block/sdmmc/BUILD.gn b/zircon/system/dev/block/sdmmc/BUILD.gn index 8f9ffd150e2..b99559c7444 100644 --- a/zircon/system/dev/block/sdmmc/BUILD.gn +++ b/zircon/system/dev/block/sdmmc/BUILD.gn @@ -63,5 +63,4 @@ test("sdmmc-test") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/block/usb-mass-storage/BUILD.gn b/zircon/system/dev/block/usb-mass-storage/BUILD.gn index 9e2fcff9e3f..194b51f72af 100644 --- a/zircon/system/dev/block/usb-mass-storage/BUILD.gn +++ b/zircon/system/dev/block/usb-mass-storage/BUILD.gn @@ -57,7 +57,6 @@ test("ums-block") { "$zx/system/ulib/fit", "$zx/system/ulib/unittest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } test("ums") { @@ -75,5 +74,4 @@ test("ums") { "$zx/system/ulib/fit", "$zx/system/ulib/unittest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/bluetooth/bt-hci-mediatek/BUILD.gn b/zircon/system/dev/bluetooth/bt-hci-mediatek/BUILD.gn index 6ba268c1998..6a0c96f1d63 100644 --- a/zircon/system/dev/bluetooth/bt-hci-mediatek/BUILD.gn +++ b/zircon/system/dev/bluetooth/bt-hci-mediatek/BUILD.gn @@ -51,5 +51,4 @@ test("bt-hci-mediatek-test") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/board/mt8167s_ref/BUILD.gn b/zircon/system/dev/board/mt8167s_ref/BUILD.gn index f331f4a5ca4..a2866cd19c0 100644 --- a/zircon/system/dev/board/mt8167s_ref/BUILD.gn +++ b/zircon/system/dev/board/mt8167s_ref/BUILD.gn @@ -88,5 +88,4 @@ test("mt8167s_ref-test") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/bus/pci/BUILD.gn b/zircon/system/dev/bus/pci/BUILD.gn index 77edef52588..191c1a23029 100644 --- a/zircon/system/dev/bus/pci/BUILD.gn +++ b/zircon/system/dev/bus/pci/BUILD.gn @@ -95,5 +95,4 @@ test("pci_tests") { "$zx/system/ulib/hwreg", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/bus/virtio/BUILD.gn b/zircon/system/dev/bus/virtio/BUILD.gn index 16601c81225..eb6a11b8eec 100644 --- a/zircon/system/dev/bus/virtio/BUILD.gn +++ b/zircon/system/dev/bus/virtio/BUILD.gn @@ -66,5 +66,4 @@ test("virtio-test") { "$zx/system/ulib/driver", "$zx/system/ulib/unittest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/clk/amlogic-clk/BUILD.gn b/zircon/system/dev/clk/amlogic-clk/BUILD.gn index c7d2d084307..38932b93ae3 100644 --- a/zircon/system/dev/clk/amlogic-clk/BUILD.gn +++ b/zircon/system/dev/clk/amlogic-clk/BUILD.gn @@ -48,5 +48,4 @@ test("amlogic-clk-test") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/clk/msm8x53-clk/BUILD.gn b/zircon/system/dev/clk/msm8x53-clk/BUILD.gn index ee91ea8eefa..981617a3543 100644 --- a/zircon/system/dev/clk/msm8x53-clk/BUILD.gn +++ b/zircon/system/dev/clk/msm8x53-clk/BUILD.gn @@ -55,5 +55,4 @@ test("msm8x53-clk-test") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/display/mt8167s-display/BUILD.gn b/zircon/system/dev/display/mt8167s-display/BUILD.gn index d4d65bd347b..9a5afbc0d34 100644 --- a/zircon/system/dev/display/mt8167s-display/BUILD.gn +++ b/zircon/system/dev/display/mt8167s-display/BUILD.gn @@ -73,5 +73,4 @@ test("dsi-host") { "$zx/system/ulib/driver", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/gpio/as370-gpio/BUILD.gn b/zircon/system/dev/gpio/as370-gpio/BUILD.gn index 86acc02d97a..41e4129eefd 100644 --- a/zircon/system/dev/gpio/as370-gpio/BUILD.gn +++ b/zircon/system/dev/gpio/as370-gpio/BUILD.gn @@ -37,5 +37,4 @@ test("as370-gpio-test") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/gpio/mt-8167/BUILD.gn b/zircon/system/dev/gpio/mt-8167/BUILD.gn index 4e682ca921f..af9d8b48703 100644 --- a/zircon/system/dev/gpio/mt-8167/BUILD.gn +++ b/zircon/system/dev/gpio/mt-8167/BUILD.gn @@ -47,5 +47,4 @@ test("mtk-gpio") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/gpio/qcom-gpio/BUILD.gn b/zircon/system/dev/gpio/qcom-gpio/BUILD.gn index 4f118795728..ee010bc7838 100644 --- a/zircon/system/dev/gpio/qcom-gpio/BUILD.gn +++ b/zircon/system/dev/gpio/qcom-gpio/BUILD.gn @@ -41,5 +41,4 @@ test("qcom-gpio-test") { "$zx/system/ulib/sync", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/i2c/mt8167-i2c/BUILD.gn b/zircon/system/dev/i2c/mt8167-i2c/BUILD.gn index b38011a04a4..966e40ea4a9 100644 --- a/zircon/system/dev/i2c/mt8167-i2c/BUILD.gn +++ b/zircon/system/dev/i2c/mt8167-i2c/BUILD.gn @@ -49,5 +49,4 @@ test("mt8167-i2c-test") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/input/bma253/BUILD.gn b/zircon/system/dev/input/bma253/BUILD.gn index 65fc6acfeee..99a6067f427 100644 --- a/zircon/system/dev/input/bma253/BUILD.gn +++ b/zircon/system/dev/input/bma253/BUILD.gn @@ -46,5 +46,4 @@ test("bma253-test") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/lib/scsi/BUILD.gn b/zircon/system/dev/lib/scsi/BUILD.gn index a132d86dca6..e7ee42a03b9 100644 --- a/zircon/system/dev/lib/scsi/BUILD.gn +++ b/zircon/system/dev/lib/scsi/BUILD.gn @@ -42,5 +42,4 @@ test("scsilib-disk-test") { "$zx/system/ulib/zircon", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/light-sensor/lite-on/BUILD.gn b/zircon/system/dev/light-sensor/lite-on/BUILD.gn index 87f716393c4..fdaccdd17f6 100644 --- a/zircon/system/dev/light-sensor/lite-on/BUILD.gn +++ b/zircon/system/dev/light-sensor/lite-on/BUILD.gn @@ -47,5 +47,4 @@ test("ltr-578als-test") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/nand/broker/test/BUILD.gn b/zircon/system/dev/nand/broker/test/BUILD.gn index 1fd8e7005f8..1552c51ad18 100644 --- a/zircon/system/dev/nand/broker/test/BUILD.gn +++ b/zircon/system/dev/nand/broker/test/BUILD.gn @@ -42,7 +42,6 @@ test("nand-broker") { deps = [ ":common", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } test("nandpart-broker") { @@ -52,5 +51,4 @@ test("nandpart-broker") { deps = [ ":common", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/nand/nand/test/BUILD.gn b/zircon/system/dev/nand/nand/test/BUILD.gn index 5ed975eb0a6..e2234a484e4 100644 --- a/zircon/system/dev/nand/nand/test/BUILD.gn +++ b/zircon/system/dev/nand/nand/test/BUILD.gn @@ -26,7 +26,6 @@ test("nand-unittest") { "$zx/system/ulib/sync", "$zx/system/ulib/unittest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } # TODO(mcgrathr): This really should be in ..:common and actually shared diff --git a/zircon/system/dev/nand/nandpart/BUILD.gn b/zircon/system/dev/nand/nandpart/BUILD.gn index c796d175503..11903ea25f4 100644 --- a/zircon/system/dev/nand/nandpart/BUILD.gn +++ b/zircon/system/dev/nand/nandpart/BUILD.gn @@ -47,5 +47,4 @@ test("nandpart-test") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/nand/ram-nand/BUILD.gn b/zircon/system/dev/nand/ram-nand/BUILD.gn index 384224bced4..51b2172afbd 100644 --- a/zircon/system/dev/nand/ram-nand/BUILD.gn +++ b/zircon/system/dev/nand/ram-nand/BUILD.gn @@ -61,5 +61,4 @@ test("ram-nand-test") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/nand/skip-block/BUILD.gn b/zircon/system/dev/nand/skip-block/BUILD.gn index 0eaa1a1919d..aa3025ceaa6 100644 --- a/zircon/system/dev/nand/skip-block/BUILD.gn +++ b/zircon/system/dev/nand/skip-block/BUILD.gn @@ -52,5 +52,4 @@ test("skip-block-test") { "$zx/system/ulib/zircon", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/power/msm8x53-power/BUILD.gn b/zircon/system/dev/power/msm8x53-power/BUILD.gn index 02c035e06eb..d9291be7bee 100644 --- a/zircon/system/dev/power/msm8x53-power/BUILD.gn +++ b/zircon/system/dev/power/msm8x53-power/BUILD.gn @@ -46,5 +46,4 @@ test("msm8x53-power-test") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/power/mtk-power/BUILD.gn b/zircon/system/dev/power/mtk-power/BUILD.gn index 07410e587b1..eb6933bac00 100644 --- a/zircon/system/dev/power/mtk-power/BUILD.gn +++ b/zircon/system/dev/power/mtk-power/BUILD.gn @@ -48,5 +48,4 @@ test("mtk-power-test") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/sysmem/sysmem/BUILD.gn b/zircon/system/dev/sysmem/sysmem/BUILD.gn index e14f573c2fd..c79ebce9b03 100644 --- a/zircon/system/dev/sysmem/sysmem/BUILD.gn +++ b/zircon/system/dev/sysmem/sysmem/BUILD.gn @@ -65,5 +65,4 @@ test("sysmem-unittest") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/test/operation/BUILD.gn b/zircon/system/dev/test/operation/BUILD.gn index 033d6a05dfc..8fcc27801db 100644 --- a/zircon/system/dev/test/operation/BUILD.gn +++ b/zircon/system/dev/test/operation/BUILD.gn @@ -18,5 +18,4 @@ test("operation") { "$zx/system/ulib/unittest", "$zx/system/ulib/zircon", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/test/usb/BUILD.gn b/zircon/system/dev/test/usb/BUILD.gn index 815b2d78a3e..0256fba0ee5 100644 --- a/zircon/system/dev/test/usb/BUILD.gn +++ b/zircon/system/dev/test/usb/BUILD.gn @@ -29,5 +29,4 @@ test("usb-unittest") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/thermal/mtk-thermal/BUILD.gn b/zircon/system/dev/thermal/mtk-thermal/BUILD.gn index c57cd4177cf..14973d012ee 100644 --- a/zircon/system/dev/thermal/mtk-thermal/BUILD.gn +++ b/zircon/system/dev/thermal/mtk-thermal/BUILD.gn @@ -53,5 +53,4 @@ test("mtk-thermal-test") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/dev/usb/mt-musb-host/BUILD.gn b/zircon/system/dev/usb/mt-musb-host/BUILD.gn index 999683f83ec..b650e44ead9 100644 --- a/zircon/system/dev/usb/mt-musb-host/BUILD.gn +++ b/zircon/system/dev/usb/mt-musb-host/BUILD.gn @@ -44,5 +44,4 @@ test("usb-transaction-test") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/aslr-analysis/BUILD.gn b/zircon/system/uapp/aslr-analysis/BUILD.gn index e4b91bec224..582093fbb1f 100644 --- a/zircon/system/uapp/aslr-analysis/BUILD.gn +++ b/zircon/system/uapp/aslr-analysis/BUILD.gn @@ -11,5 +11,4 @@ executable("aslr-analysis") { "$zx/system/ulib/fdio", "$zx/system/ulib/zircon", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/audio/BUILD.gn b/zircon/system/uapp/audio/BUILD.gn index 5999216805b..6f440c6b6fc 100644 --- a/zircon/system/uapp/audio/BUILD.gn +++ b/zircon/system/uapp/audio/BUILD.gn @@ -18,5 +18,4 @@ executable("audio") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/biotime/BUILD.gn b/zircon/system/uapp/biotime/BUILD.gn index ca652fe2690..f24ab68f5f8 100644 --- a/zircon/system/uapp/biotime/BUILD.gn +++ b/zircon/system/uapp/biotime/BUILD.gn @@ -18,5 +18,4 @@ executable("biotime") { "$zx/system/ulib/zircon", "$zx/system/ulib/zircon-internal", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/blobfs/BUILD.gn b/zircon/system/uapp/blobfs/BUILD.gn index fbe3b816d33..ea13702d1cb 100644 --- a/zircon/system/uapp/blobfs/BUILD.gn +++ b/zircon/system/uapp/blobfs/BUILD.gn @@ -28,5 +28,4 @@ executable("blobfs") { "$zx/third_party/ulib/lz4", "$zx/third_party/ulib/uboringssl", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/channel-perf/BUILD.gn b/zircon/system/uapp/channel-perf/BUILD.gn index 9dffbbaf005..9f0304c0a9c 100644 --- a/zircon/system/uapp/channel-perf/BUILD.gn +++ b/zircon/system/uapp/channel-perf/BUILD.gn @@ -11,5 +11,4 @@ executable("channel-perf") { "$zx/system/ulib/fdio", "$zx/system/ulib/zircon", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/crasher/BUILD.gn b/zircon/system/uapp/crasher/BUILD.gn index 4755991dfeb..f424f591ac9 100644 --- a/zircon/system/uapp/crasher/BUILD.gn +++ b/zircon/system/uapp/crasher/BUILD.gn @@ -12,5 +12,4 @@ executable("crasher") { "$zx/system/ulib/fdio", "$zx/system/ulib/zircon", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/disk-pave/BUILD.gn b/zircon/system/uapp/disk-pave/BUILD.gn index 730feb88323..fc759cc93a4 100644 --- a/zircon/system/uapp/disk-pave/BUILD.gn +++ b/zircon/system/uapp/disk-pave/BUILD.gn @@ -23,7 +23,6 @@ executable("install-disk-image") { "$zx/system/ulib/paver", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } test("install-disk-image-test") { @@ -46,5 +45,4 @@ test("install-disk-image-test") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/display-test/BUILD.gn b/zircon/system/uapp/display-test/BUILD.gn index 321e3e3facb..eac2e421f46 100644 --- a/zircon/system/uapp/display-test/BUILD.gn +++ b/zircon/system/uapp/display-test/BUILD.gn @@ -19,5 +19,4 @@ executable("display-test") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/fvm-check/BUILD.gn b/zircon/system/uapp/fvm-check/BUILD.gn index 1657d965a8b..6eb38425607 100644 --- a/zircon/system/uapp/fvm-check/BUILD.gn +++ b/zircon/system/uapp/fvm-check/BUILD.gn @@ -19,5 +19,4 @@ executable("fvm-check") { "$zx/third_party/ulib/cksum", "$zx/third_party/ulib/uboringssl", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/goldfish-benchmark/BUILD.gn b/zircon/system/uapp/goldfish-benchmark/BUILD.gn index 65819f7c228..d85d893a9e7 100644 --- a/zircon/system/uapp/goldfish-benchmark/BUILD.gn +++ b/zircon/system/uapp/goldfish-benchmark/BUILD.gn @@ -13,5 +13,4 @@ executable("goldfish-benchmark") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/gpt/BUILD.gn b/zircon/system/uapp/gpt/BUILD.gn index 4446e617329..b8237c8ecea 100644 --- a/zircon/system/uapp/gpt/BUILD.gn +++ b/zircon/system/uapp/gpt/BUILD.gn @@ -16,5 +16,4 @@ executable("gpt") { "$zx/system/ulib/zx", "$zx/third_party/ulib/cksum", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/hid/BUILD.gn b/zircon/system/uapp/hid/BUILD.gn index 1e2f5ed0faf..d0c6ee1119a 100644 --- a/zircon/system/uapp/hid/BUILD.gn +++ b/zircon/system/uapp/hid/BUILD.gn @@ -16,5 +16,4 @@ executable("hid") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/ihda/BUILD.gn b/zircon/system/uapp/ihda/BUILD.gn index 8c501174a82..2c3dbddaefd 100644 --- a/zircon/system/uapp/ihda/BUILD.gn +++ b/zircon/system/uapp/ihda/BUILD.gn @@ -20,5 +20,4 @@ executable("ihda") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/iochk/BUILD.gn b/zircon/system/uapp/iochk/BUILD.gn index 5a02f538f39..3802183efa7 100644 --- a/zircon/system/uapp/iochk/BUILD.gn +++ b/zircon/system/uapp/iochk/BUILD.gn @@ -18,5 +18,4 @@ executable("iochk") { "$zx/system/ulib/zircon-internal", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/kcounter/BUILD.gn b/zircon/system/uapp/kcounter/BUILD.gn index 8096823a110..75f1b470914 100644 --- a/zircon/system/uapp/kcounter/BUILD.gn +++ b/zircon/system/uapp/kcounter/BUILD.gn @@ -14,5 +14,4 @@ executable("kcounter") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/kstress/BUILD.gn b/zircon/system/uapp/kstress/BUILD.gn index c18bcdb06e2..e4e7ea8e804 100644 --- a/zircon/system/uapp/kstress/BUILD.gn +++ b/zircon/system/uapp/kstress/BUILD.gn @@ -16,5 +16,4 @@ executable("kstress") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/ktrace/BUILD.gn b/zircon/system/uapp/ktrace/BUILD.gn index ee7a5550b3a..ff467dd7d96 100644 --- a/zircon/system/uapp/ktrace/BUILD.gn +++ b/zircon/system/uapp/ktrace/BUILD.gn @@ -13,5 +13,4 @@ executable("ktrace") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/light/BUILD.gn b/zircon/system/uapp/light/BUILD.gn index ad000f77f0a..9cce05e9b53 100644 --- a/zircon/system/uapp/light/BUILD.gn +++ b/zircon/system/uapp/light/BUILD.gn @@ -14,5 +14,4 @@ executable("light") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/loadgen/BUILD.gn b/zircon/system/uapp/loadgen/BUILD.gn index 98e96c4c890..11f9703e5d1 100644 --- a/zircon/system/uapp/loadgen/BUILD.gn +++ b/zircon/system/uapp/loadgen/BUILD.gn @@ -11,5 +11,4 @@ executable("loadgen") { "$zx/system/ulib/fdio", "$zx/system/ulib/zircon", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/lsblk/BUILD.gn b/zircon/system/uapp/lsblk/BUILD.gn index d51296a4084..f1bdf1d9afe 100644 --- a/zircon/system/uapp/lsblk/BUILD.gn +++ b/zircon/system/uapp/lsblk/BUILD.gn @@ -20,5 +20,4 @@ executable("lsblk") { "$zx/system/ulib/zx", "$zx/third_party/ulib/cksum", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/lspwr/BUILD.gn b/zircon/system/uapp/lspwr/BUILD.gn index d717299775b..44bfcfc19b4 100644 --- a/zircon/system/uapp/lspwr/BUILD.gn +++ b/zircon/system/uapp/lspwr/BUILD.gn @@ -12,5 +12,4 @@ executable("lspwr") { "$zx/system/ulib/fdio", "$zx/system/ulib/zircon", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/minfs/BUILD.gn b/zircon/system/uapp/minfs/BUILD.gn index 40ddf2cce67..108f379f8af 100644 --- a/zircon/system/uapp/minfs/BUILD.gn +++ b/zircon/system/uapp/minfs/BUILD.gn @@ -30,5 +30,4 @@ executable("minfs") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/nand-loader/BUILD.gn b/zircon/system/uapp/nand-loader/BUILD.gn index c1027183f75..58a11b5fa0e 100644 --- a/zircon/system/uapp/nand-loader/BUILD.gn +++ b/zircon/system/uapp/nand-loader/BUILD.gn @@ -15,5 +15,4 @@ executable("nand-loader") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/nand-util/BUILD.gn b/zircon/system/uapp/nand-util/BUILD.gn index af7e92b372b..a9defdd701c 100644 --- a/zircon/system/uapp/nand-util/BUILD.gn +++ b/zircon/system/uapp/nand-util/BUILD.gn @@ -20,7 +20,6 @@ executable("nand-util") { "$zx/system/ulib/zx", "$zx/third_party/ulib/cksum", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } source_set("common") { @@ -52,5 +51,4 @@ test("nand-util-test") { "$zx/system/ulib/fdio", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/psutils/BUILD.gn b/zircon/system/uapp/psutils/BUILD.gn index c38dfecbc54..b68cf7b2692 100644 --- a/zircon/system/uapp/psutils/BUILD.gn +++ b/zircon/system/uapp/psutils/BUILD.gn @@ -108,7 +108,6 @@ executable("memgraph") { "$zx/system/ulib/task-utils", "$zx/system/ulib/zircon", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } # Generate an include file that contains the schema JSON. @@ -151,7 +150,6 @@ executable("threads") { "$zx/system/ulib/zircon", "$zx/third_party/ulib/backtrace", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } executable("signal") { diff --git a/zircon/system/uapp/runtests/BUILD.gn b/zircon/system/uapp/runtests/BUILD.gn index 64796a2d99f..5db94a6a3cc 100644 --- a/zircon/system/uapp/runtests/BUILD.gn +++ b/zircon/system/uapp/runtests/BUILD.gn @@ -20,5 +20,4 @@ executable("runtests") { "$zx/system/ulib/zircon-internal", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/thermal-cli/BUILD.gn b/zircon/system/uapp/thermal-cli/BUILD.gn index bc9cc74185b..06ce9308402 100644 --- a/zircon/system/uapp/thermal-cli/BUILD.gn +++ b/zircon/system/uapp/thermal-cli/BUILD.gn @@ -14,5 +14,4 @@ executable("thermal-cli") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/trace-benchmark/BUILD.gn b/zircon/system/uapp/trace-benchmark/BUILD.gn index b3b7b773fd5..4e28a4aceed 100644 --- a/zircon/system/uapp/trace-benchmark/BUILD.gn +++ b/zircon/system/uapp/trace-benchmark/BUILD.gn @@ -23,5 +23,4 @@ executable("trace-benchmark") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/trace-example/BUILD.gn b/zircon/system/uapp/trace-example/BUILD.gn index 19255fb6f55..9e011d01f51 100644 --- a/zircon/system/uapp/trace-example/BUILD.gn +++ b/zircon/system/uapp/trace-example/BUILD.gn @@ -20,5 +20,4 @@ executable("trace-example") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/usb-fwloader/BUILD.gn b/zircon/system/uapp/usb-fwloader/BUILD.gn index 99264d1c9e7..e04711af597 100644 --- a/zircon/system/uapp/usb-fwloader/BUILD.gn +++ b/zircon/system/uapp/usb-fwloader/BUILD.gn @@ -18,5 +18,4 @@ executable("usb-fwloader") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/waitfor/BUILD.gn b/zircon/system/uapp/waitfor/BUILD.gn index 885b51f11d5..b3a75c1fba9 100644 --- a/zircon/system/uapp/waitfor/BUILD.gn +++ b/zircon/system/uapp/waitfor/BUILD.gn @@ -15,5 +15,4 @@ executable("waitfor") { "$zx/system/ulib/zx", "$zx/third_party/ulib/cksum", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/uapp/xdc-test/BUILD.gn b/zircon/system/uapp/xdc-test/BUILD.gn index 4517b583409..95a2519cf2c 100644 --- a/zircon/system/uapp/xdc-test/BUILD.gn +++ b/zircon/system/uapp/xdc-test/BUILD.gn @@ -15,7 +15,6 @@ executable("xdc-test") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } host_tool("xdc-test-host") { diff --git a/zircon/system/ulib/async-loop/test/BUILD.gn b/zircon/system/ulib/async-loop/test/BUILD.gn index 320af07bc8c..8ad603c8424 100644 --- a/zircon/system/ulib/async-loop/test/BUILD.gn +++ b/zircon/system/ulib/async-loop/test/BUILD.gn @@ -25,5 +25,4 @@ test("async-loop") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/ulib/async/test/BUILD.gn b/zircon/system/ulib/async/test/BUILD.gn index 868dc79dea0..fb9ab2a0e5c 100644 --- a/zircon/system/ulib/async/test/BUILD.gn +++ b/zircon/system/ulib/async/test/BUILD.gn @@ -30,5 +30,4 @@ test("async") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/ulib/blobfs/test/BUILD.gn b/zircon/system/ulib/blobfs/test/BUILD.gn index 90d6053dbcb..243b6141a6d 100644 --- a/zircon/system/ulib/blobfs/test/BUILD.gn +++ b/zircon/system/ulib/blobfs/test/BUILD.gn @@ -34,5 +34,4 @@ test("blobfs-unit") { "$zx/system/ulib/unittest", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/ulib/bootfs/BUILD.gn b/zircon/system/ulib/bootfs/BUILD.gn index 55a2c48ff83..da7fe3f5e2d 100644 --- a/zircon/system/ulib/bootfs/BUILD.gn +++ b/zircon/system/ulib/bootfs/BUILD.gn @@ -26,5 +26,4 @@ test("bootfs-test") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/ulib/cobalt-client/test/BUILD.gn b/zircon/system/ulib/cobalt-client/test/BUILD.gn index 2fe4e2ef031..aa80d5a1822 100644 --- a/zircon/system/ulib/cobalt-client/test/BUILD.gn +++ b/zircon/system/ulib/cobalt-client/test/BUILD.gn @@ -18,5 +18,4 @@ test("cobalt-client-unit") { "$zx/system/ulib/cobalt-client:in-memory-logger", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/ulib/ddk/BUILD.gn b/zircon/system/ulib/ddk/BUILD.gn index 03b8693ceb6..7b9ac2dc821 100644 --- a/zircon/system/ulib/ddk/BUILD.gn +++ b/zircon/system/ulib/ddk/BUILD.gn @@ -80,5 +80,4 @@ test("ddk-unittest") { "$zx/system/ulib/unittest", "$zx/system/ulib/zircon", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/ulib/digest/test/BUILD.gn b/zircon/system/ulib/digest/test/BUILD.gn index 7c2f24ca135..95056c2b357 100644 --- a/zircon/system/ulib/digest/test/BUILD.gn +++ b/zircon/system/ulib/digest/test/BUILD.gn @@ -22,5 +22,4 @@ test("digest") { "$zx/system/ulib/zircon", "$zx/third_party/ulib/uboringssl", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/ulib/disk-inspector/test/BUILD.gn b/zircon/system/ulib/disk-inspector/test/BUILD.gn index f88537b11c4..5ac44424b5b 100644 --- a/zircon/system/ulib/disk-inspector/test/BUILD.gn +++ b/zircon/system/ulib/disk-inspector/test/BUILD.gn @@ -20,5 +20,4 @@ test("disk-inspector-unit") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/ulib/driver-integration-test/test/BUILD.gn b/zircon/system/ulib/driver-integration-test/test/BUILD.gn index 3e78b00f6ea..2dc6e2e8a3f 100644 --- a/zircon/system/ulib/driver-integration-test/test/BUILD.gn +++ b/zircon/system/ulib/driver-integration-test/test/BUILD.gn @@ -25,5 +25,4 @@ test("driver-integration") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/ulib/fvm/test/BUILD.gn b/zircon/system/ulib/fvm/test/BUILD.gn index 682b162d2f8..3e91459f2da 100644 --- a/zircon/system/ulib/fvm/test/BUILD.gn +++ b/zircon/system/ulib/fvm/test/BUILD.gn @@ -25,6 +25,5 @@ test("fvm-unit") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } } diff --git a/zircon/system/ulib/gpt/test/BUILD.gn b/zircon/system/ulib/gpt/test/BUILD.gn index 1fb674bb6d5..397e011d198 100644 --- a/zircon/system/ulib/gpt/test/BUILD.gn +++ b/zircon/system/ulib/gpt/test/BUILD.gn @@ -26,5 +26,4 @@ test("gpt-unit") { "$zx/system/ulib/zx", "$zx/third_party/ulib/cksum", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/ulib/id_allocator/test/BUILD.gn b/zircon/system/ulib/id_allocator/test/BUILD.gn index aff3e63fa33..82bff67232f 100644 --- a/zircon/system/ulib/id_allocator/test/BUILD.gn +++ b/zircon/system/ulib/id_allocator/test/BUILD.gn @@ -19,5 +19,4 @@ test("id_allocator") { "$zx/system/ulib/id_allocator", "$zx/system/ulib/unittest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/ulib/io-scheduler/BUILD.gn b/zircon/system/ulib/io-scheduler/BUILD.gn index 720339bc50f..c37e34ea9df 100644 --- a/zircon/system/ulib/io-scheduler/BUILD.gn +++ b/zircon/system/ulib/io-scheduler/BUILD.gn @@ -28,5 +28,4 @@ test("io-scheduler-test") { "$zx/system/ulib/io-scheduler", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/ulib/minfs/allocator/test/BUILD.gn b/zircon/system/ulib/minfs/allocator/test/BUILD.gn index 86e6ab07249..5932ee34d8a 100644 --- a/zircon/system/ulib/minfs/allocator/test/BUILD.gn +++ b/zircon/system/ulib/minfs/allocator/test/BUILD.gn @@ -21,7 +21,6 @@ test("minfs-allocator-unit") { "$zx/system/ulib/minfs", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] include_dirs = [ ".." ] } diff --git a/zircon/system/ulib/minfs/test/BUILD.gn b/zircon/system/ulib/minfs/test/BUILD.gn index aac1f705399..2d4a7880f5e 100644 --- a/zircon/system/ulib/minfs/test/BUILD.gn +++ b/zircon/system/ulib/minfs/test/BUILD.gn @@ -25,7 +25,6 @@ test("minfs-work-queue-unit") { "$zx/system/ulib/zxtest", ] include_dirs = [ "$zx/system/ulib/minfs" ] - configs += [ "$zx/public/gn/config:static-libc++" ] } test("minfs-format-unit") { @@ -39,7 +38,6 @@ test("minfs-format-unit") { "$zx/system/ulib/zxtest", ] include_dirs = [ "$zx/system/ulib/minfs" ] - configs += [ "$zx/public/gn/config:static-libc++" ] } test("minfs-inspector-unit") { diff --git a/zircon/system/ulib/paver/BUILD.gn b/zircon/system/ulib/paver/BUILD.gn index 24bd8975cc8..4ee2857b19e 100644 --- a/zircon/system/ulib/paver/BUILD.gn +++ b/zircon/system/ulib/paver/BUILD.gn @@ -79,5 +79,4 @@ test("paver-test") { "$zx/system/ulib/svc", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/ulib/simplehid/test/BUILD.gn b/zircon/system/ulib/simplehid/test/BUILD.gn index 0ec997866f5..b943df00c79 100644 --- a/zircon/system/ulib/simplehid/test/BUILD.gn +++ b/zircon/system/ulib/simplehid/test/BUILD.gn @@ -27,5 +27,4 @@ test("simplehid") { "$zx/system/ulib/zx", "..", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/ulib/storage-metrics/test/BUILD.gn b/zircon/system/ulib/storage-metrics/test/BUILD.gn index 0e40e46820b..3b0e662fb57 100644 --- a/zircon/system/ulib/storage-metrics/test/BUILD.gn +++ b/zircon/system/ulib/storage-metrics/test/BUILD.gn @@ -23,5 +23,4 @@ test("storage-metrics") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/ulib/tftp/BUILD.gn b/zircon/system/ulib/tftp/BUILD.gn index e28bbda6d6e..7f260f0c34b 100644 --- a/zircon/system/ulib/tftp/BUILD.gn +++ b/zircon/system/ulib/tftp/BUILD.gn @@ -37,7 +37,6 @@ if (!is_kernel) { "$zx/system/ulib/tftp", "$zx/system/ulib/unittest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } host_tool("tftp-example") { diff --git a/zircon/system/ulib/trace-vthread/BUILD.gn b/zircon/system/ulib/trace-vthread/BUILD.gn index 837eb326154..a6817f96e45 100644 --- a/zircon/system/ulib/trace-vthread/BUILD.gn +++ b/zircon/system/ulib/trace-vthread/BUILD.gn @@ -102,7 +102,6 @@ test("trace-vthread-test") { ":test-common", "$zx/system/ulib/trace-engine", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } # The unittest with a static trace-engine. @@ -111,5 +110,4 @@ test("trace-vthread-with-static-engine-test") { ":test-common", "$zx/system/ulib/trace-engine:trace-engine-static", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/ulib/zbi-bootfs/test/BUILD.gn b/zircon/system/ulib/zbi-bootfs/test/BUILD.gn index f1033caa622..90deaf6bde9 100644 --- a/zircon/system/ulib/zbi-bootfs/test/BUILD.gn +++ b/zircon/system/ulib/zbi-bootfs/test/BUILD.gn @@ -39,7 +39,6 @@ test("zbi-bootfs-test") { "$zx/system/ulib/zbi-bootfs", "$zx/system/ulib/zircon", ] - configs += [ "$zx/public/gn/config:static-libc++" ] data_deps = [ ":test-zbi", diff --git a/zircon/system/ulib/zircon/BUILD.gn b/zircon/system/ulib/zircon/BUILD.gn index 4161cfb39bd..79a0cf8c71f 100644 --- a/zircon/system/ulib/zircon/BUILD.gn +++ b/zircon/system/ulib/zircon/BUILD.gn @@ -8,17 +8,33 @@ import("$zx/public/gn/toolchain/environment_redirect.gni") # The vDSO can't be built with instrumentation. exclude_tags = [ "instrumented" ] -if (toolchain.tags + exclude_tags - exclude_tags != toolchain.tags || - toolchain.base_environment != "user") { - # References from other toolchains just redirect. This prevents extra - # abigen runs in other toolchains just to get identical generated headers. +if (toolchain.environment != "user") { + # References from other environments only get the headers. + group("zircon") { + public_deps = [ + ":headers", + ] + } + environment_redirect("headers") { + environment_label = "$zx/public/gn/toolchain:user" + direct = true + shlib = true + exclude_variant_tags = exclude_tags + deps = [ + ":headers", + ] + } +} else if (toolchain.tags + exclude_tags - exclude_tags != toolchain.tags) { + # References from instrumented variants just redirect. This prevents + # extra abigen runs in other toolchains just to get identical generated + # headers. foreach(target, [ "zircon", "headers", ]) { environment_redirect(target) { - environment_label = "$zx/public/gn/toolchain:user" + direct = true shlib = true exclude_variant_tags = exclude_tags deps = [ @@ -80,6 +96,13 @@ if (toolchain.tags + exclude_tags - exclude_tags != toolchain.tags || # This doesn't get normal default deps on libc. no_implicit_deps = true + # This doesn't actually use libc++ at all, really (only header-only use + # would be safe). But the compiler driver implicitly links it in, and by + # default with dynamic linking. So it's crucial to tell it to link it in + # statically instead even though really we shouldn't get it at all. We + # don't just use `-nostdlib++` because we still want the header access. + configs += [ "$zx/public/gn/config:static-libc++" ] + # TODO(BLD-353): The SDK exports this as part of the sysroot rather # than as an independent library. Legacy integration likewise does not # use a //zircon/public/lib/zircon buts instead uses libs=["zircon"]. diff --git a/zircon/system/ulib/zxtest/test/BUILD.gn b/zircon/system/ulib/zxtest/test/BUILD.gn index 41d2c11a4ef..a3e4d486ab5 100644 --- a/zircon/system/ulib/zxtest/test/BUILD.gn +++ b/zircon/system/ulib/zxtest/test/BUILD.gn @@ -30,6 +30,5 @@ test("zxtest") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } } diff --git a/zircon/system/ulib/zxtest/test/integration/BUILD.gn b/zircon/system/ulib/zxtest/test/integration/BUILD.gn index 85a0df36c89..9b9b521a357 100644 --- a/zircon/system/ulib/zxtest/test/integration/BUILD.gn +++ b/zircon/system/ulib/zxtest/test/integration/BUILD.gn @@ -30,6 +30,5 @@ test("zxtest-integration") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } } diff --git a/zircon/system/utest/async-testutils/BUILD.gn b/zircon/system/utest/async-testutils/BUILD.gn index 391b5eed0ee..11a551b9a79 100644 --- a/zircon/system/utest/async-testutils/BUILD.gn +++ b/zircon/system/utest/async-testutils/BUILD.gn @@ -17,5 +17,4 @@ test("async-testutils") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/biotime/BUILD.gn b/zircon/system/utest/biotime/BUILD.gn index 39b63a65627..7762568fbfb 100644 --- a/zircon/system/utest/biotime/BUILD.gn +++ b/zircon/system/utest/biotime/BUILD.gn @@ -14,5 +14,4 @@ test("biotime") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/bitmap/BUILD.gn b/zircon/system/utest/bitmap/BUILD.gn index bbfec5385f8..2df2dc7dff6 100644 --- a/zircon/system/utest/bitmap/BUILD.gn +++ b/zircon/system/utest/bitmap/BUILD.gn @@ -15,5 +15,4 @@ test("bitmap") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/blobfs-bench/BUILD.gn b/zircon/system/utest/blobfs-bench/BUILD.gn index 6f1ba7e3fbe..d8292259a8b 100644 --- a/zircon/system/utest/blobfs-bench/BUILD.gn +++ b/zircon/system/utest/blobfs-bench/BUILD.gn @@ -36,5 +36,4 @@ test("blobfs-bench") { "$zx/system/ulib/zx", "$zx/third_party/ulib/uboringssl", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/blobfs/BUILD.gn b/zircon/system/utest/blobfs/BUILD.gn index 13c7ecf0f91..449e12bdb62 100644 --- a/zircon/system/utest/blobfs/BUILD.gn +++ b/zircon/system/utest/blobfs/BUILD.gn @@ -37,5 +37,4 @@ test("blobfs") { "$zx/third_party/ulib/lz4", "$zx/third_party/ulib/uboringssl", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/chromeos-disk-setup/BUILD.gn b/zircon/system/utest/chromeos-disk-setup/BUILD.gn index d2bd4daa538..27aa5524fbf 100644 --- a/zircon/system/utest/chromeos-disk-setup/BUILD.gn +++ b/zircon/system/utest/chromeos-disk-setup/BUILD.gn @@ -19,5 +19,4 @@ test("chromeos-disk-setup") { "$zx/system/ulib/zxio", "$zx/third_party/ulib/cksum", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/cobalt-client/BUILD.gn b/zircon/system/utest/cobalt-client/BUILD.gn index d782dac59ed..bb8e48ae74a 100644 --- a/zircon/system/utest/cobalt-client/BUILD.gn +++ b/zircon/system/utest/cobalt-client/BUILD.gn @@ -31,5 +31,4 @@ test("cobalt-client") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/core/BUILD.gn b/zircon/system/utest/core/BUILD.gn index 24a3a38fb7f..f7b40d91e43 100644 --- a/zircon/system/utest/core/BUILD.gn +++ b/zircon/system/utest/core/BUILD.gn @@ -75,7 +75,6 @@ executable("core-tests") { "$zx/system/ulib/zircon", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } # Next, build each into its own standalone test binary. @@ -85,6 +84,5 @@ foreach(test_name, core_tests) { deps = [ test_name, ] - configs += [ "$zx/public/gn/config:static-libc++" ] } } diff --git a/zircon/system/utest/crypto/BUILD.gn b/zircon/system/utest/crypto/BUILD.gn index 49b6d3602e8..bea76c0cfd7 100644 --- a/zircon/system/utest/crypto/BUILD.gn +++ b/zircon/system/utest/crypto/BUILD.gn @@ -19,5 +19,4 @@ test("crypto") { "$zx/system/ulib/unittest", "$zx/system/ulib/zircon", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/ctor/BUILD.gn b/zircon/system/utest/ctor/BUILD.gn index 202a22e3f47..def594fc989 100644 --- a/zircon/system/utest/ctor/BUILD.gn +++ b/zircon/system/utest/ctor/BUILD.gn @@ -11,7 +11,6 @@ test("ctor") { "$zx/system/ulib/fdio", "$zx/system/ulib/unittest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } library("dso-ctor") { @@ -24,5 +23,4 @@ library("dso-ctor") { deps = [ "$zx/system/ulib/unittest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/devfs/BUILD.gn b/zircon/system/utest/devfs/BUILD.gn index afb1a487142..b122b2152e9 100644 --- a/zircon/system/utest/devfs/BUILD.gn +++ b/zircon/system/utest/devfs/BUILD.gn @@ -17,5 +17,4 @@ test("devfs") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/device-enumeration/BUILD.gn b/zircon/system/utest/device-enumeration/BUILD.gn index 4cb374c6f87..76896fdcb25 100644 --- a/zircon/system/utest/device-enumeration/BUILD.gn +++ b/zircon/system/utest/device-enumeration/BUILD.gn @@ -16,5 +16,4 @@ test("device-enumeration") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/driver-test/BUILD.gn b/zircon/system/utest/driver-test/BUILD.gn index 566ffef2e3d..04442060397 100644 --- a/zircon/system/utest/driver-test/BUILD.gn +++ b/zircon/system/utest/driver-test/BUILD.gn @@ -18,5 +18,4 @@ test("driver-test") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/elf-search/BUILD.gn b/zircon/system/utest/elf-search/BUILD.gn index d24e9e25c94..f737a738854 100644 --- a/zircon/system/utest/elf-search/BUILD.gn +++ b/zircon/system/utest/elf-search/BUILD.gn @@ -15,5 +15,4 @@ test("elf-search") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/entropy/BUILD.gn b/zircon/system/utest/entropy/BUILD.gn index 55642416bf2..5f552164935 100644 --- a/zircon/system/utest/entropy/BUILD.gn +++ b/zircon/system/utest/entropy/BUILD.gn @@ -13,5 +13,4 @@ test("entropy") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/ethernet/BUILD.gn b/zircon/system/utest/ethernet/BUILD.gn index 2b14fe631e8..327c01aca2d 100644 --- a/zircon/system/utest/ethernet/BUILD.gn +++ b/zircon/system/utest/ethernet/BUILD.gn @@ -19,5 +19,4 @@ test("ethernet") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/fbl/BUILD.gn b/zircon/system/utest/fbl/BUILD.gn index 18d1919085b..cdd09a9411e 100644 --- a/zircon/system/utest/fbl/BUILD.gn +++ b/zircon/system/utest/fbl/BUILD.gn @@ -57,6 +57,5 @@ test("fbl") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } } diff --git a/zircon/system/utest/fdio/BUILD.gn b/zircon/system/utest/fdio/BUILD.gn index 6d1bbb8d8e8..118040f2eae 100644 --- a/zircon/system/utest/fdio/BUILD.gn +++ b/zircon/system/utest/fdio/BUILD.gn @@ -19,7 +19,6 @@ test("fdio") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] data_deps = [ ":accept-child", diff --git a/zircon/system/utest/fidl-coding-tables/BUILD.gn b/zircon/system/utest/fidl-coding-tables/BUILD.gn index 9e96c52f87f..63341ed904f 100644 --- a/zircon/system/utest/fidl-coding-tables/BUILD.gn +++ b/zircon/system/utest/fidl-coding-tables/BUILD.gn @@ -21,7 +21,6 @@ if (current_toolchain != default_toolchain) { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } } diff --git a/zircon/system/utest/fidl-llcpp-interop/BUILD.gn b/zircon/system/utest/fidl-llcpp-interop/BUILD.gn index a55b928af05..f84ad1171b1 100644 --- a/zircon/system/utest/fidl-llcpp-interop/BUILD.gn +++ b/zircon/system/utest/fidl-llcpp-interop/BUILD.gn @@ -36,7 +36,6 @@ if (current_toolchain != default_toolchain) { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } } diff --git a/zircon/system/utest/fidl-simple/BUILD.gn b/zircon/system/utest/fidl-simple/BUILD.gn index f788ee696b9..e2dd801289d 100644 --- a/zircon/system/utest/fidl-simple/BUILD.gn +++ b/zircon/system/utest/fidl-simple/BUILD.gn @@ -32,7 +32,6 @@ if (is_fuchsia) { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } } diff --git a/zircon/system/utest/fidl/BUILD.gn b/zircon/system/utest/fidl/BUILD.gn index 782bedd0ac8..01cbabc8bdc 100644 --- a/zircon/system/utest/fidl/BUILD.gn +++ b/zircon/system/utest/fidl/BUILD.gn @@ -35,7 +35,6 @@ executable("fidl-handle-policy-test-app") { deps = [ ":common", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } test("fidl") { @@ -53,5 +52,4 @@ test("fidl") { ":common", ":fidl-handle-policy-test-app", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/fit/BUILD.gn b/zircon/system/utest/fit/BUILD.gn index 48416c70f46..859f5ec3321 100644 --- a/zircon/system/utest/fit/BUILD.gn +++ b/zircon/system/utest/fit/BUILD.gn @@ -18,7 +18,6 @@ test("fit") { if (is_fuchsia) { defines = [ "FIT_NO_STD_FOR_ZIRCON_USERSPACE" ] deps += [ "$zx/system/ulib/fdio" ] - configs += [ "$zx/public/gn/config:static-libc++" ] } else { sources += [ "bridge_tests.cpp", diff --git a/zircon/system/utest/fs-bench/BUILD.gn b/zircon/system/utest/fs-bench/BUILD.gn index b45a5745075..2ed4c1ff8e6 100644 --- a/zircon/system/utest/fs-bench/BUILD.gn +++ b/zircon/system/utest/fs-bench/BUILD.gn @@ -34,5 +34,4 @@ test("fs-bench") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/fs-management/BUILD.gn b/zircon/system/utest/fs-management/BUILD.gn index 428d11a2bc2..c545073d55d 100644 --- a/zircon/system/utest/fs-management/BUILD.gn +++ b/zircon/system/utest/fs-management/BUILD.gn @@ -33,5 +33,4 @@ test("fs-management") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/fs-recovery/BUILD.gn b/zircon/system/utest/fs-recovery/BUILD.gn index 6dce13d84b1..efe2ab07df8 100644 --- a/zircon/system/utest/fs-recovery/BUILD.gn +++ b/zircon/system/utest/fs-recovery/BUILD.gn @@ -28,5 +28,4 @@ test("fs-recovery") { "$zx/system/ulib/unittest", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/fs-test-utils/BUILD.gn b/zircon/system/utest/fs-test-utils/BUILD.gn index 2e9f851a26f..2990616aa80 100644 --- a/zircon/system/utest/fs-test-utils/BUILD.gn +++ b/zircon/system/utest/fs-test-utils/BUILD.gn @@ -38,5 +38,4 @@ test("fs-test-utils") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/fs-vnode/BUILD.gn b/zircon/system/utest/fs-vnode/BUILD.gn index 387fad66225..f7532d2616c 100644 --- a/zircon/system/utest/fs-vnode/BUILD.gn +++ b/zircon/system/utest/fs-vnode/BUILD.gn @@ -31,5 +31,4 @@ test("fs-vnode") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/fs/BUILD.gn b/zircon/system/utest/fs/BUILD.gn index 4a78f2ebba5..6f86cbb4b72 100644 --- a/zircon/system/utest/fs/BUILD.gn +++ b/zircon/system/utest/fs/BUILD.gn @@ -96,5 +96,4 @@ test("fs") { "$zx/system/ulib/zx", "$zx/third_party/ulib/uboringssl", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/futex-ownership/BUILD.gn b/zircon/system/utest/futex-ownership/BUILD.gn index b1208e127d3..7f4c0e9bd8c 100644 --- a/zircon/system/utest/futex-ownership/BUILD.gn +++ b/zircon/system/utest/futex-ownership/BUILD.gn @@ -16,5 +16,4 @@ test("futex-ownership") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/fvm/BUILD.gn b/zircon/system/utest/fvm/BUILD.gn index b377dfacbf3..6b7542be9aa 100644 --- a/zircon/system/utest/fvm/BUILD.gn +++ b/zircon/system/utest/fvm/BUILD.gn @@ -38,5 +38,4 @@ test("fvm") { "$zx/third_party/ulib/cksum", "$zx/third_party/ulib/uboringssl", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/fzl/BUILD.gn b/zircon/system/utest/fzl/BUILD.gn index 1edb34da1aa..7762795e185 100644 --- a/zircon/system/utest/fzl/BUILD.gn +++ b/zircon/system/utest/fzl/BUILD.gn @@ -23,5 +23,4 @@ test("fzl") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/goldfish/BUILD.gn b/zircon/system/utest/goldfish/BUILD.gn index ec2efa54116..2a52ec69950 100644 --- a/zircon/system/utest/goldfish/BUILD.gn +++ b/zircon/system/utest/goldfish/BUILD.gn @@ -15,5 +15,4 @@ test("goldfish") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/hid-parser/BUILD.gn b/zircon/system/utest/hid-parser/BUILD.gn index b87af3085ce..f1dcd3ae6eb 100644 --- a/zircon/system/utest/hid-parser/BUILD.gn +++ b/zircon/system/utest/hid-parser/BUILD.gn @@ -15,7 +15,6 @@ test("hid-parser") { "$zx/system/ulib/hid-parser", "$zx/system/ulib/unittest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } # TODO(BLD-356): hid-parser-fuzzer # sources=["hid-parser-fuzztest.cpp"] diff --git a/zircon/system/utest/hid/BUILD.gn b/zircon/system/utest/hid/BUILD.gn index 00647d8d020..bc3cf7a25f6 100644 --- a/zircon/system/utest/hid/BUILD.gn +++ b/zircon/system/utest/hid/BUILD.gn @@ -20,7 +20,6 @@ test("hid") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } test("hid-parse-size") { @@ -41,5 +40,4 @@ test("hid-parse-size") { "$zx/system/ulib/unittest", "$zx/system/ulib/zircon", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/hypervisor/BUILD.gn b/zircon/system/utest/hypervisor/BUILD.gn index 53f10767e90..785168ceb05 100644 --- a/zircon/system/utest/hypervisor/BUILD.gn +++ b/zircon/system/utest/hypervisor/BUILD.gn @@ -15,5 +15,4 @@ test("hypervisor") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/inspect-vmo/BUILD.gn b/zircon/system/utest/inspect-vmo/BUILD.gn index c78635f2f19..3c1cf31b918 100644 --- a/zircon/system/utest/inspect-vmo/BUILD.gn +++ b/zircon/system/utest/inspect-vmo/BUILD.gn @@ -19,5 +19,4 @@ test("inspect-vmo") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/kcounter/BUILD.gn b/zircon/system/utest/kcounter/BUILD.gn index 65a9b03ebda..f581bae128c 100644 --- a/zircon/system/utest/kcounter/BUILD.gn +++ b/zircon/system/utest/kcounter/BUILD.gn @@ -16,5 +16,4 @@ test("kcounter") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/launchpad/BUILD.gn b/zircon/system/utest/launchpad/BUILD.gn index ddfaf44e0da..c470a30a866 100644 --- a/zircon/system/utest/launchpad/BUILD.gn +++ b/zircon/system/utest/launchpad/BUILD.gn @@ -16,5 +16,4 @@ test("launchpad") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/libfzl/BUILD.gn b/zircon/system/utest/libfzl/BUILD.gn index 4f89e8a1155..6eec9d29350 100644 --- a/zircon/system/utest/libfzl/BUILD.gn +++ b/zircon/system/utest/libfzl/BUILD.gn @@ -19,5 +19,4 @@ test("libfzl") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/log/BUILD.gn b/zircon/system/utest/log/BUILD.gn index 668abd9168e..799fb1c2f52 100644 --- a/zircon/system/utest/log/BUILD.gn +++ b/zircon/system/utest/log/BUILD.gn @@ -19,5 +19,4 @@ test("log") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/logger/BUILD.gn b/zircon/system/utest/logger/BUILD.gn index 6b61e46e95b..c7942e6edb8 100644 --- a/zircon/system/utest/logger/BUILD.gn +++ b/zircon/system/utest/logger/BUILD.gn @@ -22,5 +22,4 @@ test("logger") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/memfs/BUILD.gn b/zircon/system/utest/memfs/BUILD.gn index 27a700e4761..2d76ff731a4 100644 --- a/zircon/system/utest/memfs/BUILD.gn +++ b/zircon/system/utest/memfs/BUILD.gn @@ -28,5 +28,4 @@ test("memfs") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/miscsvc/BUILD.gn b/zircon/system/utest/miscsvc/BUILD.gn index ce4de960e95..b83b190b9cd 100644 --- a/zircon/system/utest/miscsvc/BUILD.gn +++ b/zircon/system/utest/miscsvc/BUILD.gn @@ -13,5 +13,4 @@ test("miscsvc") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/perftest/BUILD.gn b/zircon/system/utest/perftest/BUILD.gn index cd9be37f721..e732c958302 100644 --- a/zircon/system/utest/perftest/BUILD.gn +++ b/zircon/system/utest/perftest/BUILD.gn @@ -37,5 +37,4 @@ test("perftest") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/platform-bus/BUILD.gn b/zircon/system/utest/platform-bus/BUILD.gn index a220252da3b..73fb1da046e 100644 --- a/zircon/system/utest/platform-bus/BUILD.gn +++ b/zircon/system/utest/platform-bus/BUILD.gn @@ -18,5 +18,4 @@ test("platform-bus") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/ramdisk/BUILD.gn b/zircon/system/utest/ramdisk/BUILD.gn index 712516b7d1f..2751e51a0a6 100644 --- a/zircon/system/utest/ramdisk/BUILD.gn +++ b/zircon/system/utest/ramdisk/BUILD.gn @@ -22,5 +22,4 @@ test("ramdisk") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/region-alloc/BUILD.gn b/zircon/system/utest/region-alloc/BUILD.gn index c88ce5e1fe7..70cb70ab921 100644 --- a/zircon/system/utest/region-alloc/BUILD.gn +++ b/zircon/system/utest/region-alloc/BUILD.gn @@ -13,5 +13,4 @@ test("region-alloc") { "$zx/system/ulib/region-alloc", "$zx/system/ulib/unittest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/runtests-utils/BUILD.gn b/zircon/system/utest/runtests-utils/BUILD.gn index 6721ee55a5e..2760a8e1911 100644 --- a/zircon/system/utest/runtests-utils/BUILD.gn +++ b/zircon/system/utest/runtests-utils/BUILD.gn @@ -12,7 +12,6 @@ test("runtests-utils") { "$zx/system/ulib/runtests-utils", "$zx/system/ulib/unittest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] if (is_fuchsia) { sources += [ "fuchsia-run-test.cpp", diff --git a/zircon/system/utest/sysinfo/BUILD.gn b/zircon/system/utest/sysinfo/BUILD.gn index 4d9f0367769..568e0e13326 100644 --- a/zircon/system/utest/sysinfo/BUILD.gn +++ b/zircon/system/utest/sysinfo/BUILD.gn @@ -14,5 +14,4 @@ test("sysinfo") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/sysmem/BUILD.gn b/zircon/system/utest/sysmem/BUILD.gn index a6072dcdbec..35cf88103c2 100644 --- a/zircon/system/utest/sysmem/BUILD.gn +++ b/zircon/system/utest/sysmem/BUILD.gn @@ -17,5 +17,4 @@ test("sysmem") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/task-utils/BUILD.gn b/zircon/system/utest/task-utils/BUILD.gn index 14e9aa5bfb6..8d1fab3e625 100644 --- a/zircon/system/utest/task-utils/BUILD.gn +++ b/zircon/system/utest/task-utils/BUILD.gn @@ -13,5 +13,4 @@ test("task-utils") { "$zx/system/ulib/unittest", "$zx/system/ulib/zircon", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/trace-reader/BUILD.gn b/zircon/system/utest/trace-reader/BUILD.gn index e0e739b6981..f2b3be0dc4b 100644 --- a/zircon/system/utest/trace-reader/BUILD.gn +++ b/zircon/system/utest/trace-reader/BUILD.gn @@ -19,6 +19,5 @@ test("trace-reader") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } } diff --git a/zircon/system/utest/trace/BUILD.gn b/zircon/system/utest/trace/BUILD.gn index 1d87f055ee4..b55d0596860 100644 --- a/zircon/system/utest/trace/BUILD.gn +++ b/zircon/system/utest/trace/BUILD.gn @@ -44,7 +44,6 @@ test("trace") { ":common", "$zx/system/ulib/trace-engine", ] - configs += [ "$zx/public/gn/config:static-libc++" ] data_deps = [ ":trace-static-engine", ] @@ -56,5 +55,4 @@ test("trace-static-engine") { ":common", "$zx/system/ulib/trace-engine:trace-engine-static", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/usb-virtual-bus/BUILD.gn b/zircon/system/utest/usb-virtual-bus/BUILD.gn index e3d5b0b0795..9131ab3d051 100644 --- a/zircon/system/utest/usb-virtual-bus/BUILD.gn +++ b/zircon/system/utest/usb-virtual-bus/BUILD.gn @@ -31,5 +31,4 @@ test("usb-virtual-bus") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/utf_conversion/BUILD.gn b/zircon/system/utest/utf_conversion/BUILD.gn index cb6e51873c0..37f4cb0a5c3 100644 --- a/zircon/system/utest/utf_conversion/BUILD.gn +++ b/zircon/system/utest/utf_conversion/BUILD.gn @@ -14,5 +14,4 @@ test("utf_conversion") { "$zx/system/ulib/utf_conversion", "$zx/system/ulib/zircon", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/vdso/BUILD.gn b/zircon/system/utest/vdso/BUILD.gn index cb05bcd4edc..62152e7eba5 100644 --- a/zircon/system/utest/vdso/BUILD.gn +++ b/zircon/system/utest/vdso/BUILD.gn @@ -14,5 +14,4 @@ test("vdso") { "$zx/system/ulib/zircon", "$zx/system/ulib/zx", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/virtio/BUILD.gn b/zircon/system/utest/virtio/BUILD.gn index c1adcf7bf65..d21f5f7a98b 100644 --- a/zircon/system/utest/virtio/BUILD.gn +++ b/zircon/system/utest/virtio/BUILD.gn @@ -16,5 +16,4 @@ test("virtio") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/virtual_camera/BUILD.gn b/zircon/system/utest/virtual_camera/BUILD.gn index 14b423b7632..c5ddecba304 100644 --- a/zircon/system/utest/virtual_camera/BUILD.gn +++ b/zircon/system/utest/virtual_camera/BUILD.gn @@ -17,5 +17,4 @@ test("virtual_camera") { "$zx/system/ulib/zx", "$zx/system/ulib/zxtest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } diff --git a/zircon/system/utest/zbi/BUILD.gn b/zircon/system/utest/zbi/BUILD.gn index aca27c21db3..aa4c25fdbb0 100644 --- a/zircon/system/utest/zbi/BUILD.gn +++ b/zircon/system/utest/zbi/BUILD.gn @@ -12,7 +12,6 @@ test("zbi") { "$zx/system/ulib/pretty", "$zx/system/ulib/unittest", ] - configs += [ "$zx/public/gn/config:static-libc++" ] if (is_fuchsia) { deps += [ "$zx/system/ulib/fdio" ] diff --git a/zircon/system/utest/zxcrypt/BUILD.gn b/zircon/system/utest/zxcrypt/BUILD.gn index ea943725a81..38674e14887 100644 --- a/zircon/system/utest/zxcrypt/BUILD.gn +++ b/zircon/system/utest/zxcrypt/BUILD.gn @@ -39,5 +39,4 @@ test("zxcrypt") { "$zx/third_party/ulib/cryptolib", "$zx/third_party/ulib/uboringssl", ] - configs += [ "$zx/public/gn/config:static-libc++" ] } -- GitLab