[clang] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

Paul Kirth via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 6 10:54:53 PST 2024


================
@@ -740,7 +740,8 @@ bool tools::isTLSDESCEnabled(const ToolChain &TC,
     SupportedArgument = V == "desc" || V == "trad";
     EnableTLSDESC = V == "desc";
   } else if (Triple.isX86()) {
-    SupportedArgument = V == "gnu";
+    SupportedArgument = V == "gnu" || V == "gnu2";
+    EnableTLSDESC = V == "gnu2";
----------------
ilovepi wrote:

Is it possible to make this option work uniformly with `trad` and `desc` too?  The `gnu`/`gnu2` spelling is something we need to support for compatibility, but it would be good if we can get this to be consistent in clang. I'm hoping we can get GCC to accept the same set of options.

@MaskRay does that sound reasonable to you?

https://github.com/llvm/llvm-project/pull/83136


More information about the cfe-commits mailing list