Notice
Copyright (c) 2020 The Khronos Group Inc. Copyright terms at http://www.khronos.org/registry/speccopyright.html
Status
-
Complete
-
Approved by the SPIR Working Group: 2020-06-24
-
Ratified the Khronos Group: 2020-08-14
Dependencies
This extension is written against the SPIR-V Specification, Version 1.5 Revision 2, Unified
This extension requires SPIR-V 1.0.
Overview
This extension adds a new Linkage Type LinkOnceODR. A global variable or function with such linkage type can be merged with equivalent global variables or functions from other modules during the linking process. The primary use case of this linkage type is to satisfy the C++ language One Definition Rule.
Extension Name
To use this extension within a SPIR-V module, the following OpExtension must be present in the module:
OpExtension "SPV_KHR_linkonce_odr"
Modifications to the SPIR-V Specification, Version 1.5
Linkage Type
In section 3.17 "Linkage Type" add the following row to the Linkage Type table:
| Linkage Type | Enabling Capabilities | |
|---|---|---|
2 |
LinkOnceODR |
Linkage |