Move pthread flags out compiler config.
That way, buildtools/third_party/libc++/BUILD.gn can opt out of it, fixing a TODO and a link-time warning when linking libc++. Once that's done, we can enable warnings-as-errors for links in asan builds. (Currently, warnings-as-errors-for-links is enabled everywhere except asan and chromecast builds.) No intended behavior change. BUG=669072 TBR=brettw Review-Url: https://codereview.chromium.org/2537493002 Cr-Original-Commit-Position: refs/heads/master@{#435255} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 5b58fafbaa929d521e638c16ff638a433ae63f2f
This commit is contained in:
Родитель
cf993e7428
Коммит
2421eedc36
|
@ -471,6 +471,7 @@ default_compiler_configs = [
|
||||||
"//build/config:feature_flags",
|
"//build/config:feature_flags",
|
||||||
"//build/config/compiler:afdo",
|
"//build/config/compiler:afdo",
|
||||||
"//build/config/compiler:compiler",
|
"//build/config/compiler:compiler",
|
||||||
|
"//build/config/compiler:pthread",
|
||||||
"//build/config/compiler:clang_stackrealign",
|
"//build/config/compiler:clang_stackrealign",
|
||||||
"//build/config/compiler:compiler_arm_fpu",
|
"//build/config/compiler:compiler_arm_fpu",
|
||||||
"//build/config/compiler:compiler_arm_thumb",
|
"//build/config/compiler:compiler_arm_thumb",
|
||||||
|
|
|
@ -503,6 +503,16 @@ 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" ]
|
||||||
|
config("pthread") {
|
||||||
|
if (is_linux) {
|
||||||
|
cflags = [ "-pthread" ]
|
||||||
|
ldflags = [ "-pthread" ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# This provides the basic options to select the target CPU and ABI.
|
# 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
|
# It is factored out of "compiler" so that special cases can use this
|
||||||
# without using everything that "compiler" brings in. Options that
|
# without using everything that "compiler" brings in. Options that
|
||||||
|
|
|
@ -13,8 +13,6 @@ group("linux") {
|
||||||
# is applied to all targets. It is here to separate out the logic that is
|
# is applied to all targets. It is here to separate out the logic that is
|
||||||
# Linux-only. This is not applied to Android, but is applied to ChromeOS.
|
# Linux-only. This is not applied to Android, but is applied to ChromeOS.
|
||||||
config("compiler") {
|
config("compiler") {
|
||||||
cflags = [ "-pthread" ]
|
|
||||||
ldflags = [ "-pthread" ]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# This is included by reference in the //build/config/compiler:runtime_library
|
# This is included by reference in the //build/config/compiler:runtime_library
|
||||||
|
|
Загрузка…
Ссылка в новой задаче