From da2e4d449c5d3cfbafb23c00401bc06aff97c9eb Mon Sep 17 00:00:00 2001 From: Scott Linder Date: Wed, 12 Feb 2020 17:34:20 -0500 Subject: [PATCH] Stop using deprecated Comgr option API Update a use of the deprecated amd_comgr_action_info_set_options to instead use amd_comgr_action_info_set_option_list. Completely remove all references to amd_comgr_action_info_set_options and amd_comgr_action_info_get_options from the runtime. Change-Id: I12a0803c87430722364ec22818e249caf3798c88 --- rocclr/device/comgrctx.cpp | 2 -- rocclr/device/comgrctx.hpp | 10 ---------- rocclr/device/devprogram.cpp | 2 +- 3 files changed, 1 insertion(+), 13 deletions(-) diff --git a/rocclr/device/comgrctx.cpp b/rocclr/device/comgrctx.cpp index bcdbec03bd..658c295057 100644 --- a/rocclr/device/comgrctx.cpp +++ b/rocclr/device/comgrctx.cpp @@ -66,8 +66,6 @@ bool Comgr::LoadLib() { GET_COMGR_SYMBOL(amd_comgr_action_info_get_isa_name) GET_COMGR_SYMBOL(amd_comgr_action_info_set_language) GET_COMGR_SYMBOL(amd_comgr_action_info_get_language) - GET_COMGR_SYMBOL(amd_comgr_action_info_set_options) - GET_COMGR_SYMBOL(amd_comgr_action_info_get_options) GET_COMGR_SYMBOL(amd_comgr_action_info_set_option_list) GET_COMGR_SYMBOL(amd_comgr_action_info_get_option_list_count) GET_COMGR_SYMBOL(amd_comgr_action_info_get_option_list_item) diff --git a/rocclr/device/comgrctx.hpp b/rocclr/device/comgrctx.hpp index 833dbbc8b6..5d51e256c1 100644 --- a/rocclr/device/comgrctx.hpp +++ b/rocclr/device/comgrctx.hpp @@ -53,8 +53,6 @@ typedef amd_comgr_status_t (*t_amd_comgr_action_info_set_isa_name)(amd_comgr_act typedef amd_comgr_status_t (*t_amd_comgr_action_info_get_isa_name)(amd_comgr_action_info_t action_info, size_t *size, char *isa_name); typedef amd_comgr_status_t (*t_amd_comgr_action_info_set_language)(amd_comgr_action_info_t action_info, amd_comgr_language_t language); typedef amd_comgr_status_t (*t_amd_comgr_action_info_get_language)(amd_comgr_action_info_t action_info, amd_comgr_language_t *language); -typedef amd_comgr_status_t (*t_amd_comgr_action_info_set_options)(amd_comgr_action_info_t action_info, const char *options); -typedef amd_comgr_status_t (*t_amd_comgr_action_info_get_options)(amd_comgr_action_info_t action_info, size_t *size, char *options); typedef amd_comgr_status_t (*t_amd_comgr_action_info_set_option_list)(amd_comgr_action_info_t action_info, const char *options[], size_t count); typedef amd_comgr_status_t (*t_amd_comgr_action_info_get_option_list_count)(amd_comgr_action_info_t action_info, size_t *count); typedef amd_comgr_status_t (*t_amd_comgr_action_info_get_option_list_item)(amd_comgr_action_info_t action_info, size_t index, size_t *size, char *option); @@ -103,8 +101,6 @@ struct ComgrEntryPoints { t_amd_comgr_action_info_get_isa_name amd_comgr_action_info_get_isa_name; t_amd_comgr_action_info_set_language amd_comgr_action_info_set_language; t_amd_comgr_action_info_get_language amd_comgr_action_info_get_language; - t_amd_comgr_action_info_set_options amd_comgr_action_info_set_options; - t_amd_comgr_action_info_get_options amd_comgr_action_info_get_options; t_amd_comgr_action_info_set_option_list amd_comgr_action_info_set_option_list; t_amd_comgr_action_info_get_option_list_count amd_comgr_action_info_get_option_list_count; t_amd_comgr_action_info_get_option_list_item amd_comgr_action_info_get_option_list_item; @@ -224,12 +220,6 @@ public: static amd_comgr_status_t action_info_get_language(amd_comgr_action_info_t action_info, amd_comgr_language_t *language) { return DYN(amd_comgr_action_info_get_language)(action_info, language); } - static amd_comgr_status_t action_info_set_options(amd_comgr_action_info_t action_info, const char *options) { - return DYN(amd_comgr_action_info_set_options)(action_info, options); - } - static amd_comgr_status_t action_info_get_options(amd_comgr_action_info_t action_info, size_t *size, char *options) { - return DYN(amd_comgr_action_info_get_options)(action_info, size, options); - } static amd_comgr_status_t action_info_set_option_list(amd_comgr_action_info_t action_info, const char *options[], size_t count) { return DYN(amd_comgr_action_info_set_option_list)(action_info, options, count); } diff --git a/rocclr/device/devprogram.cpp b/rocclr/device/devprogram.cpp index 7cd01797aa..5f1d80dcd4 100644 --- a/rocclr/device/devprogram.cpp +++ b/rocclr/device/devprogram.cpp @@ -596,7 +596,7 @@ bool Program::compileAndLinkExecutable(const amd_comgr_data_set_t inputs, } // Create executable from the relocatable data set - amd::Comgr::action_info_set_options(action, ""); + amd::Comgr::action_info_set_option_list(action, nullptr, 0); if (status == AMD_COMGR_STATUS_SUCCESS) { status = amd::Comgr::do_action(AMD_COMGR_ACTION_LINK_RELOCATABLE_TO_EXECUTABLE, action, relocatableData, output);