r237771 - [clang-cl] Map /GA to -ftls-model=local-exec
David Majnemer
david.majnemer at gmail.com
Tue May 19 21:39:56 PDT 2015
Author: majnemer
Date: Tue May 19 23:39:56 2015
New Revision: 237771
URL: http://llvm.org/viewvc/llvm-project?rev=237771&view=rev
Log:
[clang-cl] Map /GA to -ftls-model=local-exec
The /GA switch informs the compiler that it may assume that all TLS
access refers to the executable's index: 0.
Modified:
cfe/trunk/include/clang/Driver/CLCompatOptions.td
cfe/trunk/test/Driver/cl-options.c
Modified: cfe/trunk/include/clang/Driver/CLCompatOptions.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CLCompatOptions.td?rev=237771&r1=237770&r2=237771&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CLCompatOptions.td (original)
+++ cfe/trunk/include/clang/Driver/CLCompatOptions.td Tue May 19 23:39:56 2015
@@ -63,6 +63,8 @@ def _SLASH_fp_except_ : CLFlag<"fp:excep
def _SLASH_fp_fast : CLFlag<"fp:fast">, HelpText<"">, Alias<ffast_math>;
def _SLASH_fp_precise : CLFlag<"fp:precise">, HelpText<"">, Alias<fno_fast_math>;
def _SLASH_fp_strict : CLFlag<"fp:strict">, HelpText<"">, Alias<fno_fast_math>;
+def _SLASH_GA : CLFlag<"GA">, Alias<ftlsmodel_EQ>, AliasArgs<["local-exec"]>,
+ HelpText<"Assume thread-local variables are defined in the executable">;
def _SLASH_GR : CLFlag<"GR">, HelpText<"Enable emission of RTTI data">;
def _SLASH_GR_ : CLFlag<"GR-">, HelpText<"Disable emission of RTTI data">;
def _SLASH_GF_ : CLFlag<"GF-">, HelpText<"Disable string pooling">,
@@ -281,7 +283,6 @@ def _SLASH_FU : CLJoinedOrSeparate<"FU">
def _SLASH_Fx : CLFlag<"Fx">;
def _SLASH_G1 : CLFlag<"G1">;
def _SLASH_G2 : CLFlag<"G2">;
-def _SLASH_GA : CLFlag<"GA">;
def _SLASH_Ge : CLFlag<"Ge">;
def _SLASH_Gh : CLFlag<"Gh">;
def _SLASH_GH : CLFlag<"GH">;
Modified: cfe/trunk/test/Driver/cl-options.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/cl-options.c?rev=237771&r1=237770&r2=237771&view=diff
==============================================================================
--- cfe/trunk/test/Driver/cl-options.c (original)
+++ cfe/trunk/test/Driver/cl-options.c Tue May 19 23:39:56 2015
@@ -48,6 +48,9 @@
// fpstrict-NOT: -menable-unsafe-fp-math
// fpstrict-NOT: -ffast-math
+// RUN: %clang_cl /GA -### -- %s 2>&1 | FileCheck -check-prefix=GA %s
+// GA: -ftls-model=local-exec
+
// RTTI is on by default; just check that we don't error.
// RUN: %clang_cl /Zs /GR -- %s 2>&1
More information about the cfe-commits
mailing list