Intel® oneAPI DPC++/C++ Compiler Developer Guide and Reference

ID 767253
Date 3/22/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

ftarget-export-symbols

Exposes exported symbols in a generated target library to allow for visibility to other modules.

Syntax

Linux:

-ftarget-export-symbols

-fno-target-export-symbols

Windows:

-ftarget-export-symbols

-fno-target-export-symbols

Arguments

None

Default

fno-target-export-symbols

Exported symbols in a generated target library are not exposed.

Description

This option exposes exported symbols in a generated target library to allow for visibility to other modules.

It can be used to prevent unresolved symbols at runtime.

NOTE:

When SYCL or OpenMP offloading is enabled, this option only applies to device-specific compilation.

IDE Equivalent

Visual Studio: C/C++: Linker > DPC++ > Expose exported symbols

DPC++: Linker > General > Expose exported symbols

Eclipse: C/C++: Intel C++ Linker > DPC++ > Expose exported symbols

DPC++: Linker > General > Expose exported symbols

Alternate Options

None

Examples

The following shows examples of using this option:

Linux

icpx -fsycl -fsycl-targets=spir64_gen -ftarget-export-symbols -Xsycl-target-backend "-device *"
icpx -fiopenmp -fopenmp-targets=spir64_gen -ftarget-export-symbols -Xopenmp-target-backend "-device *"

Windows

icx -fsycl -fsycl-targets=spir64_gen -ftarget-export-symbols -Xsycl-target-backend "-device *"
icx -Qopenmp -Qopenmp-targets=spir64_gen -ftarget-export-symbols -Xopenmp-target-backend "-device *"