f670ae2f8d
SWDEV-76911 - Bug 11070: ViennaCL fails in amd::hsa::loader::Executable::Destroy Destructors of global variables run in undefined order, so loader cannot be global. Encapsulate loader functionality in Loader class and link its lifecycle to Runtime. In HSA Runtime, create Loader as part of Runtime singleton. In ORCA Runtime, create Loader as part of HSAILProgram class. Testing: smoke, pre-checkin Affected files ... ... //depot/stg/opencl/drivers/opencl/compiler/sc/HSAIL/ext/amdhsacod/amdhsacod.cpp#10 integrate ... //depot/stg/opencl/drivers/opencl/compiler/sc/HSAIL/ext/loader/executable.cpp#12 integrate ... //depot/stg/opencl/drivers/opencl/compiler/sc/HSAIL/ext/loader/executable.hpp#8 integrate ... //depot/stg/opencl/drivers/opencl/compiler/sc/HSAIL/include/amd_hsa_loader.hpp#5 integrate ... //depot/stg/opencl/drivers/opencl/compiler/tools/aoc2/aoc2.cpp#78 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.cpp#210 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuprogram.hpp#61 edit