Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 1.54 KB

ga-optimize-for-windows-application.md

File metadata and controls

40 lines (26 loc) · 1.54 KB
description title ms.date f1_keywords helpviewer_keywords ms.assetid
Learn more about: /GA (Optimize for Windows Application)
/GA (Optimize for Windows Application)
11/04/2016
VC.Project.VCCLCompilerTool.OptimizeForWindowsApplication
/ga
/GA compiler option [C++]
GA compiler option [C++]
-GA compiler option [C++]
Optimize for Windows compiler options
be97323e-15a0-4836-862c-95980b51926a

/GA (Optimize for Windows Application)

Results in more efficient code for an .exe file for accessing thread-local storage (TLS) variables.

Syntax

/GA

Remarks

/GA speeds access to data declared with __declspec(thread) in a Windows-based program. When this option is set, the __tls_index macro is assumed to be 0.

Using /GA for a DLL can result in bad code generation.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Set C++ compiler and build properties in Visual Studio.

  2. Select the Configuration Properties > C/C++ > Command Line property page.

  3. Enter the compiler option in the Additional Options box.

To set this compiler option programmatically

  • See xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.AdditionalOptions%2A.

See also

MSVC Compiler Options
MSVC Compiler Command-Line Syntax