Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(423)

Unified Diff: base/BUILD.gn

Issue 2823303003: base: remove -latomic in CrOS chroot (Closed)
Patch Set: More robust check for CrOS environment Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698