@@ -126,6 +126,7 @@ def beginFile(self, genOpts):
126126 preamble += '#include "openxr/openxr_platform.h"\n \n '
127127 preamble += '#include "loader_interfaces.h"\n \n '
128128 preamble += '#include "loader_instance.hpp"\n \n '
129+ preamble += '#include "loader_platform.hpp"\n \n '
129130
130131 elif self .genOpts .filename == 'xr_generated_loader.cpp' :
131132 preamble += '#include "xr_generated_loader.hpp"\n \n '
@@ -208,6 +209,11 @@ def outputLoaderManualFuncs(self):
208209 # Use the Cdecl directly from the XML
209210 func_proto = cur_cmd .cdecl
210211
212+ # Export only core functions
213+ if self .isCoreExtensionName (cur_cmd .ext_name ):
214+ func_proto = func_proto .replace (
215+ "XRAPI_ATTR" , "LOADER_EXPORT XRAPI_ATTR" )
216+
211217 # Output the standard API form of the command
212218 manual_funcs += func_proto
213219 manual_funcs += '\n '
@@ -487,8 +493,14 @@ def outputLoaderGeneratedFuncs(self):
487493
488494 if cur_cmd .protect_value :
489495 generated_funcs += '#if %s\n ' % cur_cmd .protect_string
496+ decl = cur_cmd .cdecl .replace (";" , " XRLOADER_ABI_TRY {\n " )
497+
498+ # Export only core functions
499+ if self .isCoreExtensionName (cur_cmd .ext_name ):
500+ decl = decl .replace (
501+ "XRAPI_ATTR" , "LOADER_EXPORT XRAPI_ATTR" )
490502
491- generated_funcs += cur_cmd . cdecl . replace ( ";" , " XRLOADER_ABI_TRY { \n " )
503+ generated_funcs += decl
492504 generated_funcs += tramp_variable_defines
493505
494506 # If this is not core, but an extension, check to make sure the extension is enabled.
0 commit comments