Index: base/BUILD.gn |
diff --git a/base/BUILD.gn b/base/BUILD.gn |
index 7714190534fc23bd8b879ffb3e119916d6c144d3..ccc9647d446f5614bae0b4fc5ed9a6fe5a9c588e 100644 |
--- a/base/BUILD.gn |
+++ b/base/BUILD.gn |
@@ -1128,8 +1128,11 @@ component("base") { |
":debugging_flags", |
] |
- # Needed for <atomic> if using newer C++ library than sysroot |
- if (!use_sysroot && (is_android || (is_linux && !is_chromecast))) { |
+ # Needed for <atomic> if using newer C++ library than sysroot, except if |
+ # building inside the cros_sdk environment - use host_toolchain as a |
+ # more robust check for this. |
+ if (!use_sysroot && (is_android || (is_linux && !is_chromecast)) && |
+ host_toolchain != "//build/toolchain/cros:host") { |
libs = [ "atomic" ] |
} |