Skip to content

Commit cc82b83

Browse files
author
Colin Robertson
committed
First pass on clr:pure deprecation
1 parent 582f589 commit cc82b83

File tree

64 files changed

+97
-68
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+97
-68
lines changed

docs/build/reference/choosing-the-format-of-netmodule-input-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ An MSIL .obj file (compiled with [/clr](../../build/reference/clr-common-languag
5252

5353
- If your modules will be used to build a managed library, and if all module input to the linker will be verifiable (produced with /clr:safe), use .obj files as module input to the linker and generate a .dll (assembly) or .netmodule (module) library file.
5454

55-
- If your modules will be used to build a managed library, and if all module input to the linker will be produced with /clr:pure or /clr:safe, use .obj files as module input to the linker and generate a .dll (assembly) or .netmodule (module) if you only want to expose managed types from the library. If you want to expose managed types from the library and if you also want C++ applications to consume the native types in the library, your library will consist of the .obj files for the libraries component modules (you will also want to ship the .h files for each module, so they can be referenced with #include from source code).
55+
- If your modules will be used to build a managed library, and if all module input to the linker will be produced with **/clr:pure** or **/clr:safe**, use .obj files as module input to the linker and generate a .dll (assembly) or .netmodule (module) if you only want to expose managed types from the library. The **/clr:pure** and **/clr:safe** compiler options are deprecated in Visual Studio 2015. If you want to expose managed types from the library and if you also want C++ applications to consume the native types in the library, your library will consist of the .obj files for the libraries component modules (you will also want to ship the .h files for each module, so they can be referenced with #include from source code).
5656

5757
- If your modules will be used to build a managed library, and if one or more modules input to the linker will be produced with just /clr, use .obj files as module input to the linker and generate a .dll (assembly). If you want to expose managed types from the library and if you also want C++ applications to consume the native types in the library, your library will consist of the .obj files for the libraries component modules (you will also want to ship the .h files for each module, so they can be referenced with #include from source code).
5858

docs/build/reference/clr-restrictions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Note the following restrictions on the use of **/clr**:
7373

7474
- The combination of the `_STATIC_CPPLIB` preprocessor definition (`/D_STATIC_CPPLIB`) and the **/clr** or **/clr:pure** compiler option is not supported. This is so because the definition would cause your application to link with the static multithreaded C++ Standard Library, which is not supported. For more information, see the [/MD, /MT, /LD (Use Run-Time Library)](../../build/reference/md-mt-ld-use-run-time-library.md) topic.
7575

76-
- [/J](../../build/reference/j-default-char-type-is-unsigned.md) is not supported with **/clr:safe** or **/clr:pure**.
76+
- [/J](../../build/reference/j-default-char-type-is-unsigned.md) is not supported with **/clr:safe** or **/clr:pure**. The **/clr:pure** and **/clr:safe** compiler options are deprecated in Visual Studio 2015.
7777

7878
- The ATL and MFC libraries are not supported by pure mode compilation (**/clr:pure**). You can use **/clr:pure** with the C++ Standard Library and the CRT if you also compile with **/MD** or **/MDd**.
7979

docs/build/reference/clrheader.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,5 +62,7 @@ translation.priority.ht:
6262

6363
You can also programmatically check if an image was built for the common language runtime. For more information, see [How to: Determine if an Image is Native or CLR](../../dotnet/how-to-determine-if-an-image-is-native-or-clr.md).
6464

65+
The **/clr:pure** and **/clr:safe** compiler options are deprecated in Visual Studio 2015.
66+
6567
## See Also
6668
[DUMPBIN Options](../../build/reference/dumpbin-options.md)

docs/build/reference/clrimagetype-specify-type-of-clr-image.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ translation.priority.ht:
4242
```
4343

4444
## Remarks
45-
The linker accepts native objects and also MSIL objects that are compiled by using [/clr](../../build/reference/clr-common-language-runtime-compilation.md), /clr:pure, or /clr:safe. When mixed objects in the same build are passed, the verifiability of the resulting output file is, by default, equal to the lowest level of verifiability of the input modules. For example, if you pass both a safe and a pure module to the linker, the output file will be pure. If you pass a native image and a mixed mode image (compiled by using **/clr**), the resulting image will be a mixed mode image.
45+
The linker accepts native objects and also MSIL objects that are compiled by using [/clr](../../build/reference/clr-common-language-runtime-compilation.md), /clr:pure, or /clr:safe. The **/clr:pure** and **/clr:safe** compiler options are deprecated in Visual Studio 2015. When mixed objects in the same build are passed, the verifiability of the resulting output file is, by default, equal to the lowest level of verifiability of the input modules. For example, if you pass both a safe and a pure module to the linker, the output file will be pure. If you pass a native image and a mixed mode image (compiled by using **/clr**), the resulting image will be a mixed mode image.
4646

4747
You can use /CLRIMAGETYPE to specify a lower level of verifiability, if that is what you need.
4848

docs/build/reference/clrunmanagedcodecheck-add-supressunmanagedcodesecurityattribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ translation.priority.ht:
4747
## Remarks
4848
By default, the linker applies the SuppressUnmanagedCodeSecurityAttribute to linker-generated `PInvoke` calls. When **/CLRUNMANAGEDCODECHECK** is in effect, SuppressUnmanagedCodeSecurityAttribute is not applied.
4949

50-
The linker only adds the attribute to objects that are compiled with **/clr** or **/clr:pure**. The linker does not generate `PInvoke` calls in objects compiled with **/clr:safe**. For more information, see [/clr (Common Language Runtime Compilation)](../../build/reference/clr-common-language-runtime-compilation.md).
50+
The linker only adds the attribute to objects that are compiled with **/clr** or **/clr:pure**. The linker does not generate `PInvoke` calls in objects compiled with **/clr:safe**. For more information, see [/clr (Common Language Runtime Compilation)](../../build/reference/clr-common-language-runtime-compilation.md). The **/clr:pure** and **/clr:safe** compiler options are deprecated in Visual Studio 2015.
5151

5252
A `PInvoke` call is generated by the linker when the linker cannot find a managed symbol to satisfy a reference from a managed caller but can find a native symbol to satisfy that reference. For more information about `PInvoke`, see [Calling Native Functions from Managed Code](../../dotnet/calling-native-functions-from-managed-code.md).
5353

docs/build/reference/gd-gr-gv-gz-calling-convention.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ These options determine the order in which function arguments are pushed onto th
7272

7373
Functions that take a variable number of arguments must be marked `__cdecl`.
7474

75-
**/Gd**, **/Gr**, **/Gv** and **/Gz** are not compatible with [/clr:safe](../../build/reference/clr-common-language-runtime-compilation.md) or **/clr:pure**.
75+
**/Gd**, **/Gr**, **/Gv** and **/Gz** are not compatible with [/clr:safe](../../build/reference/clr-common-language-runtime-compilation.md) or **/clr:pure**. The **/clr:pure** and **/clr:safe** compiler options are deprecated in Visual Studio 2015.
7676

7777
> [!NOTE]
7878
> By default for x86 processors, C++ member functions use [__thiscall](../../cpp/thiscall.md).

docs/build/reference/ltcg-link-time-code-generation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,9 +145,9 @@ translation.priority.mt:
145145
## /LTCG and MSIL Modules
146146
Modules that are compiled by using [/GL](../../build/reference/gl-whole-program-optimization.md) and [/clr](../../build/reference/clr-common-language-runtime-compilation.md) can be used as input to the linker when **/LTCG** is specified.
147147

148-
- **/LTCG** can accept native object files, mixed native/managed object files (compiled by using **/clr**), and pure object files (compiled by using **/clr:pure**), and safe object files (compiled by using **/clr:safe**)
148+
- **/LTCG** can accept native object files, mixed native/managed object files (compiled by using **/clr**), and pure object files (compiled by using **/clr:pure**), and safe object files (compiled by using **/clr:safe**). The **/clr:pure** and **/clr:safe** compiler options are deprecated in Visual Studio 2015.
149149

150-
- **/LTCG** can accept safe .netmodules, which can be created by using **/clr:safe /LN** in Visual C++ and **/target:module** in any other Visual Studio compiler. .Netmodules produced by using**/clr** or **/clr:pure** are not accepted by **/LTCG**.
150+
- **/LTCG** can accept safe .netmodules, which can be created by using **/clr:safe /LN** in Visual C++ and **/target:module** in any .NET Visual Studio compiler. .Netmodules produced by using **/clr** or **/clr:pure** are not accepted by **/LTCG**.
151151

152152
- /LTCG:PGI does not accept native modules compiled by using **/GL** and **/clr**, or pure modules (produced by using **/clr:pure**)
153153

docs/build/reference/netmodule-files-as-linker-input.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ link.exe now accepts MSIL .obj and .netmodules as input. The output file produce
4040

4141
.netmodules are created by the Visual C++ compiler with [/LN (Create MSIL Module)](../../build/reference/ln-create-msil-module.md) or by the linker with [/NOASSEMBLY (Create a MSIL Module)](../../build/reference/noassembly-create-a-msil-module.md). .objs are always created in a Visual C++ compilation. For other Visual Studio compilers, use the **/target:module** compiler option.
4242

43-
In most cases, you will need to pass to the linker the .obj file from the Visual C++ compilation that created the .netmodule, unless the .netmodule was created with [/clr (Common Language Runtime Compilation)](../../build/reference/clr-common-language-runtime-compilation.md). MSIL .netmodules used as input to the linker must be pure MSIL, which can be produced by the Visual C++ compiler using **/clr:safe**. Other Visual Studio compilers produce pure MSIL modules by default.
43+
In most cases, you will need to pass to the linker the .obj file from the Visual C++ compilation that created the .netmodule, unless the .netmodule was created with [/clr (Common Language Runtime Compilation)](../../build/reference/clr-common-language-runtime-compilation.md). MSIL .netmodules used as input to the linker must be pure MSIL, which can be produced by the Visual C++ compiler using **/clr:safe**. The **/clr:pure** and **/clr:safe** compiler options are deprecated in Visual Studio 2015. The .NET Visual Studio compilers produce pure MSIL modules by default.
4444

4545
For information on how to invoke the linker from the command line, see [Linker Command-Line Syntax](../../build/reference/linker-command-line-syntax.md) and [Setting the Path and Environment Variables for Command-Line Builds](../../build/setting-the-path-and-environment-variables-for-command-line-builds.md).
4646

docs/c-runtime-library/crt-library-features.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ This topic discusses the various .lib files that comprise the C run-time librari
8787
|msvcrtd.lib|Static library for the Debug version of the native CRT startup for use with DLL UCRT and vcruntime. Not redistributable.|**/MDd**|_DEBUG, _MT, _DLL|
8888
|msvcmrt.lib|Static library for the mixed native and managed CRT startup for use with DLL UCRT and vcruntime.|**/clr**||
8989
|msvcmrtd.lib|Static library for the Debug version of the mixed native and managed CRT startup for use with DLL UCRT and vcruntime. Not redistributable.|**/clr**||
90-
|msvcurt.lib|Static library for the pure managed CRT.|**/clr:pure**||
91-
|msvcurtd.lib|Static library for the Debug version of the pure managed CRT. Not redistributable.|**/clr:pure**||
90+
|msvcurt.lib|**Deprecated** Static library for the pure managed CRT.|**/clr:pure**||
91+
|msvcurtd.lib|**Deprecated** Static library for the Debug version of the pure managed CRT. Not redistributable.|**/clr:pure**||
9292

9393
If you link your program from the command line without a compiler option that specifies a C run-time library, the linker will usethe statically linked CRT libraries: libcmt.lib, libvcruntime.lib, and libucrt.lib.
9494

@@ -98,7 +98,7 @@ This topic discusses the various .lib files that comprise the C run-time librari
9898

9999
If you are using the **/clr** compiler switch, your code will be linked with a static library, msvcmrt.lib. The static library provides a proxy between your managed code and the native CRT. You cannot use the statically linked CRT ( **/MT** or **/MTd** options) with **/clr**. Use the dynamically-linked libraries (**/MD** or **/MDd**) instead.
100100

101-
If you are using the **/clr:pure** compiler switch, your code will be linked with the static library msvcurt.lib. As with **/clr**, you cannot link with the statically linked library.
101+
If you are using the **/clr:pure** compiler switch, your code will be linked with the static library msvcurt.lib. As with **/clr**, you cannot link with the statically linked library. The **/clr:pure** and **/clr:safe** compiler options are deprecated in Visual Studio 2015.
102102

103103
For more information on using the CRT with **/clr**, see [Mixed (Native and Managed) Assemblies](../dotnet/mixed-native-and-managed-assemblies.md); for **/clr:pure**, see [Pure and Verifiable Code (C++/CLI)](../dotnet/pure-and-verifiable-code-cpp-cli.md).
104104

docs/c-runtime-library/link-options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ translation.priority.mt:
6161
# Link Options
6262
The CRT lib directory includes a number of small object files that enable specific CRT features without any code change. These are called "link options" since you just have to add them to the linker command line to use them.
6363

64-
Pure mode versions have been added. Use the regular versions for native and /clr code, use the pure versions (prefixed with a p) for /clr:pure mode.
64+
Pure mode versions exist but are deprecated in Visual Studio 2015. Use the regular versions for native and /clr code, use the pure versions (prefixed with a p) for /clr:pure mode. The **/clr:pure** and **/clr:safe** compiler options are deprecated in Visual Studio 2015.
6565

6666
|Native and /clr|Pure mode|Description|
6767
|----------------------|---------------|-----------------|

0 commit comments

Comments
 (0)