perfetto: fix ChromeOS build
Don't bother defining what the default stdlib should be for non
hermetic clang: just let the compiler decide.
Bug: 257861740
Change-Id: Ifc3afbac92ce72f0001f41af3336156fa991ffbb
diff --git a/gn/standalone/BUILD.gn b/gn/standalone/BUILD.gn
index 192bee8..bd21589 100644
--- a/gn/standalone/BUILD.gn
+++ b/gn/standalone/BUILD.gn
@@ -249,9 +249,11 @@
not_needed([ "hermetic_clang_suppressions" ])
}
- if (is_clang && !is_hermetic_clang && !is_wasm) {
- cflags_cc += [ "-stdlib=" + non_hermetic_clang_stdlib ]
- ldflags += [ "-stdlib=" + non_hermetic_clang_stdlib ]
+ if (non_hermetic_clang_stdlib != "") {
+ if (is_clang && !is_hermetic_clang && !is_wasm) {
+ cflags_cc += [ "-stdlib=" + non_hermetic_clang_stdlib ]
+ ldflags += [ "-stdlib=" + non_hermetic_clang_stdlib ]
+ }
}
if (is_lto) {
diff --git a/gn/standalone/toolchain/llvm.gni b/gn/standalone/toolchain/llvm.gni
index 3726411..13bae47 100644
--- a/gn/standalone/toolchain/llvm.gni
+++ b/gn/standalone/toolchain/llvm.gni
@@ -16,11 +16,7 @@
declare_args() {
is_hermetic_clang = is_clang && (is_linux_host || is_win_host)
- if (is_linux_host) {
- non_hermetic_clang_stdlib = "libstdc++"
- } else {
- non_hermetic_clang_stdlib = "libc++"
- }
+ non_hermetic_clang_stdlib = ""
}
assert(!is_hermetic_clang || is_clang, "is_hermetic_clang requires is_clang")