Skip to content

Commit de98695

Browse files
ilovepiCQ Bot
authored andcommitted
[build] Cleanup TODO for TLSDESC compiler flags
After llvm/llvm-project#124990, LLVM sets TLSDESC as the default for Fuchsia targets. This patch moves the config setting into clang_defaults. Fixed: 322984857 Change-Id: Idca5a2c13e7f2128a5c28b337689db4ed4caf1ba Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1265705 Fuchsia-Auto-Submit: Paul Kirth <[email protected]> Reviewed-by: Roland McGrath <[email protected]> Commit-Queue: Auto-Submit <auto-submit-builder@fuchsia-internal-service-accts.iam.gserviceaccount.com>
1 parent 279777c commit de98695

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

build/config/BUILD.gn

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,9 @@ config("compiler") {
125125
":stack-size-section",
126126
]
127127

128-
# TODO(https://fxbug.dev/322984857): Only add this config for is_gcc configs
129-
# after we roll a toolchain with default TLSDESC for Fuchsia targets, at
130-
# which point it can be moved into clang_defaults.
131-
configs += [ ":default-tls-dialect" ]
132-
133-
if (!is_gcc) {
128+
if (is_gcc) {
129+
configs += [ ":default-tls-dialect" ]
130+
} else {
134131
configs += [
135132
":clang_defaults",
136133
":embed_bitcode",
@@ -194,7 +191,6 @@ config("clang_defaults") {
194191
cflags_cc = [ "-stdlib=libc++" ]
195192
ldflags = [
196193
"-stdlib=libc++",
197-
198194
"--start-no-unused-arguments",
199195
"-unwindlib=libunwind",
200196
"-rtlib=compiler-rt",
@@ -1584,15 +1580,15 @@ tlsdesc = {
15841580
# On riscv64 TLSDESC is opt-in or opt-out via -mtls-dialect=... under Clang, but is not currently supported in GCC.
15851581
can_enable = !is_gcc
15861582
can_disable = !is_gcc
1587-
compiler_default = false
1583+
compiler_default = !is_gcc
15881584
} else if (current_cpu == "x64") {
15891585
enable_dialect = "gnu2"
15901586
disable_dialect = "gnu"
15911587
have_tlsdesc = 1
15921588

15931589
can_enable = true
15941590
can_disable = true
1595-
compiler_default = false
1591+
compiler_default = !is_gcc
15961592
} else if (current_cpu == "arm") {
15971593
enable_dialect = "gnu2"
15981594
disable_dialect = "gnu"

0 commit comments

Comments
 (0)