Skip to content

Commit 7552aeb

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#2302 from MicrosoftDocs/master637299144608997233
Fix git push error for protected CLA branch
2 parents f5830fa + 80c8a51 commit 7552aeb

16 files changed

+689
-681
lines changed

docs/build/reference/c-cpp-prop-page.md

Lines changed: 70 additions & 70 deletions
Large diffs are not rendered by default.
Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,41 @@
11
---
22
title: "CL Command Files"
3-
ms.date: "11/04/2016"
3+
description: "The MSVC compiler lets you specify command files that contain command-line options."
4+
ms.date: 07/08/2020
45
helpviewer_keywords: ["cl.exe compiler, command files", "command files", "command files, CL compiler"]
56
ms.assetid: ec3cea06-2af0-4fe9-a94c-119c9d31b3a9
67
---
78
# CL Command Files
89

9-
A command file is a text file that contains options and filenames you would otherwise type on the [command line](compiler-command-line-syntax.md) or specify using the [CL environment variable](cl-environment-variables.md). CL accepts a compiler command file as an argument in the CL environment variable or on the command line. Unlike either the command line or the CL environment variable, a command file allows you to use multiple lines of options and filenames.
10+
A command file is a text file that contains compiler options and filenames. It supplies options you would otherwise type on the [command line](compiler-command-line-syntax.md), or specify using the [CL environment variable](cl-environment-variables.md). CL accepts a compiler command file as an argument, either in the CL environment variable, or on the command line. Unlike either the command line or the CL environment variable, you can use multiple lines of options and filenames in a command file.
1011

11-
Options and filenames in a command file are processed according to the location of a command filename within the CL environment variable or on the command line. However, if the /link option appears in the command file, all options on the rest of the line are passed to the linker. Options in subsequent lines in the command file and options on the command line after the command file invocation are still accepted as compiler options. For more information on how the order of options affects their interpretation, see [Order of CL Options](order-of-cl-options.md).
12+
Options and filenames in a command file are processed when a command filename appears within the CL environment variable or on the command line. However, if the **`/link`** option appears in the command file, all options on the rest of the line are passed to the linker. Options in later lines in the command file, and options on the command line after the command file invocation, are still accepted as compiler options. For more information on how the order of options affects their interpretation, see [Order of CL Options](order-of-cl-options.md).
1213

13-
A command file must not contain the CL command. Each option must begin and end on the same line; you cannot use the backslash (**\\**) to combine an option across two lines.
14+
A command file must not contain the CL command. Each option must begin and end on the same line; you can't use the backslash (**`\`**) to combine an option across two lines.
1415

15-
A command file is specified by an at sign (**\@**) followed by a filename; the filename can specify an absolute or relative path.
16+
A command file is specified by an at sign (**`@`**) followed by a filename. The filename can specify an absolute or relative path.
1617

1718
For example, if the following command is in a file named RESP:
1819

19-
```
20-
/Og /link LIBC.LIB
20+
```cmd
21+
/Ot /link LIBC.LIB
2122
```
2223

2324
and you specify the following CL command:
2425

25-
```
26+
```cmd
2627
CL /Ob2 @RESP MYAPP.C
2728
```
2829

2930
the command to CL is as follows:
3031

31-
```
32-
CL /Ob2 /Og MYAPP.C /link LIBC.LIB
32+
```cmd
33+
CL /Ob2 /Ot MYAPP.C /link LIBC.LIB
3334
```
3435

35-
Note that the command line and the command-file commands are effectively combined.
36+
Here you can see how the command line and the command-file commands are effectively combined.
3637

3738
## See also
3839

39-
[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md)<br/>
40-
[MSVC Compiler Options](compiler-options.md)
40+
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)<br/>
41+
[MSVC compiler options](compiler-options.md)

docs/build/reference/compiler-options-listed-alphabetically.md

Lines changed: 157 additions & 157 deletions
Large diffs are not rendered by default.

docs/build/reference/compiler-options-listed-by-category.md

Lines changed: 187 additions & 187 deletions
Large diffs are not rendered by default.
Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
11
---
2-
title: "/GT (Support Fiber-Safe Thread-Local Storage)"
3-
ms.date: "11/04/2016"
2+
title: "/GT (Support fiber-safe thread-local storage)"
3+
description: "The MSVC compiler option /GT enables safe optimizations for thread-local storage data."
4+
ms.date: 07/08/2020
45
f1_keywords: ["VC.Project.VCCLCompilerTool.EnableFiberSafeOptimizations", "/gt"]
56
helpviewer_keywords: ["/GT compiler option [C++]", "GT compiler option [C++]", "thread-local storage", "static thread-local storage and fiber safety", "-GT compiler option [C++]", "fiber-safe static thread-local storage compiler option [C++]"]
67
ms.assetid: 071fec79-c701-432b-9970-457344133159
78
---
8-
# /GT (Support Fiber-Safe Thread-Local Storage)
9+
# `/GT` (Support fiber-safe thread-local storage)
910

1011
Supports fiber safety for data allocated using static thread-local storage, that is, data allocated with `__declspec(thread)`.
1112

1213
## Syntax
1314

14-
```
15-
/GT
16-
```
15+
> **`/GT`**
1716
1817
## Remarks
1918

2019
Data declared with `__declspec(thread)` is referenced through a thread-local storage (TLS) array. The TLS array is an array of addresses that the system maintains for each thread. Each address in this array gives the location of thread-local storage data.
2120

22-
A fiber is a lightweight object that consists of a stack and a register context and can be scheduled on various threads. A fiber can run on any thread. Because a fiber may get swapped out and restarted later on a different thread, the address of the TLS array must not be cached or optimized as a common subexpression across a function call (see the [/Og (Global Optimizations)](og-global-optimizations.md) option for details). **/GT** prevents such optimizations.
21+
A fiber is a lightweight object that consists of a stack and a register context and can be scheduled on various threads. A fiber can run on any thread. Because a fiber may get swapped out and restarted later on a different thread, the compiler mustn't cache the address of the TLS array, or optimize it as a common subexpression across a function call. **`/GT`** prevents such optimizations.
2322

2423
### To set this compiler option in the Visual Studio development environment
2524

2625
1. Open the project's **Property Pages** dialog box. For details, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
2726

28-
1. Click the **C/C++** folder.
29-
30-
1. Click the **Optimization** property page.
27+
1. Select the **Configuration Properties** > **C/C++** > **Optimization** property page.
3128

3229
1. Modify the **Enable Fiber-safe Optimizations** property.
3330

@@ -37,5 +34,5 @@ A fiber is a lightweight object that consists of a stack and a register context
3734

3835
## See also
3936

40-
[MSVC Compiler Options](compiler-options.md)<br/>
41-
[MSVC Compiler Command-Line Syntax](compiler-command-line-syntax.md)
37+
[MSVC compiler options](compiler-options.md)<br/>
38+
[MSVC compiler command-line syntax](compiler-command-line-syntax.md)

0 commit comments

Comments
 (0)