Intel® oneAPI DPC++/C++ Compiler
Developer Guide and Reference
A newer version of this document is available. Customers should click here to go to the newest version.
Visible to Intel only — GUID: GUID-E0D40DDC-9041-47EF-829F-270F140B79ED
Visible to Intel only — GUID: GUID-E0D40DDC-9041-47EF-829F-270F140B79ED
fdata-sections, Gw
Places each data item in its own COMDAT section.
Syntax
Linux: |
-fdata-sections |
Windows: |
/Gw |
Arguments
None
Default
OFF |
The compiler does not separate functions into COMDATs. |
Description
This option places each data item in its own COMDAT section.
When using this compiler option, you can add the linker option -Wl,--gc-sections (LInux) or /link /OPT:REF (Windows), which will remove all unused code.
When you put each data item in its own section, it enables the linker to reorder the sections for other possible optimization.
Alternate Options
None