Index: base/BUILD.gn |
diff --git a/base/BUILD.gn b/base/BUILD.gn |
index 78953bef001f4cec586d935a9680e804755f31d3..992e357855a4454dfbc6e07342493cdf598ca7e4 100644 |
--- a/base/BUILD.gn |
+++ b/base/BUILD.gn |
@@ -1129,7 +1129,14 @@ component("base") { |
# Needed for <atomic> if using newer C++ library than sysroot |
if (!use_sysroot && (is_android || (is_linux && !is_chromecast))) { |
- libs = [ "atomic" ] |
+ # libatomic is not provided by the CrOS sysroot, so don't attempt |
+ # to link to it under these circumstances. is_chromeos = true / |
+ # target_os = "chrome_os" are not exclusive to the CrOS sysroot |
+ # (since these can be built for desktop Linux too), so check the |
+ # toolchain to make sure. |
+ if (host_toolchain != "//build/toolchain/cros:host") { |
Dirk Pranke
2017/04/25 19:18:06
I'd fold the comment and the check into the outer
|
+ libs = [ "atomic" ] |
+ } |
} |
if (use_experimental_allocator_shim) { |