Visible to Intel only — GUID: GUID-32E93CAB-15CF-4DDC-8392-BFE4FD37ADFC
Visible to Intel only — GUID: GUID-32E93CAB-15CF-4DDC-8392-BFE4FD37ADFC
fvisibility
Specifies the default visibility for global symbols or the visibility for symbols in declarations, functions, or variables.
Syntax
Linux: |
-fvisibility=arg -fvisibility-global-new-delete-hidden -fvisibility-inlines-hidden -f[no]visibility-inlines-hidden-static-local-var -fvisibility-ms-compat |
Windows: |
None |
Arguments
arg |
Specifies the visibility setting. Possible values are:
|
Default
-fvisibility=default |
The compiler sets visibility of symbols to default. |
Description
This option specifies the default visibility for global symbols (syntax -fvisibility=arg) or the visibility for symbols in declarations, functions, or variables.
The following table shows supported -fvisibility options:
Option |
Description |
---|---|
-fvisibility=arg |
Sets visibility of symbols for all global declarations. As specified above in Arguments, arg can be one of the following: hidden internal default protected. |
-fvisibility-global-new-delete-hidden |
Sets hidden visibility for global C++ operator new and delete declarations. |
-fvisibility-inlines-hidden |
Sets hidden visibility by default for inline C++ member functions. |
-fvisibility-inlines-hidden-static-local-var |
When -fvisibility-inlines-hidden is enabled, static variables in inline C++ member functions will also be given hidden visibility by default. To disable option -fvisibility-inlines-hidden-static-local-var, specify option -fno-visibility-inlines-hidden-static-local-var. |
-fvisibility-ms-compat |
Sets default visibility for global types and sets hidden visibility for global functions and variables. |
If an -fvisibility option is specified more than once on the command line, the last specification takes precedence over any others.
The following shows the precedence of the visibility settings (from greatest to least visibility):
default
protected
hidden
Clang fvisibility options are also supported. For more information on these options, see the Clang documentation.
IDE Equivalent
Alternate Options
None