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

Unified Diff: build/config/compiler/BUILD.gn

Issue 2914653002: Roll buildtools to 31d4da (Closed)
Patch Set: Update buildtools again Created 3 years, 7 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 | « build/config/BUILDCONFIG.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 7eb4fb3f3e8886c46ed457de778f4f3ff637838a..95996abcec489f52a20da2d9fb3eb2b7f742179d 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -421,6 +421,13 @@ config("compiler") {
cflags += [ "-B$binutils_path" ]
}
+ if (is_linux) {
+ cflags += [ "-pthread" ]
+ # Do not use the -pthread ldflag here since it becomes a no-op
+ # when using -nodefaultlibs, which would cause an unused argument
+ # error. "-lpthread" is added in //build/config:default_libs.
+ }
+
# Clang-specific compiler flags setup.
# ------------------------------------
if (is_clang) {
@@ -545,16 +552,6 @@ config("compiler") {
}
}
-# This is separate from :compiler (and not even a sub-config there)
-# so that some targets can remove it from the list with:
-# configs -= [ "//build/config/compiler:pthread" ]
Nico 2017/06/02 01:48:12 Huh, I'm surprised nobody seems to do this.
-config("pthread") {
- if (is_linux) {
- cflags = [ "-pthread" ]
- ldflags = [ "-pthread" ]
- }
-}
-
# This provides the basic options to select the target CPU and ABI.
# It is factored out of "compiler" so that special cases can use this
# without using everything that "compiler" brings in. Options that
« no previous file with comments | « build/config/BUILDCONFIG.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698