SWDEV-297217 - Append user options after default options

Change-Id: I1bdd309f98997f805357baa5d3ff36063797460c
This commit is contained in:
Jatin Chaudhary
2021-08-18 04:27:26 -07:00
committato da Jatin Chaudhary
parent 7aaad05910
commit c250a13849
+5 -1
Vedi File
@@ -244,7 +244,8 @@ hiprtcResult hiprtcCompileProgram(hiprtcProgram prog, int numOptions, const char
amd::Program* program = as_amd(reinterpret_cast<cl_program>(prog));
std::ostringstream ostrstr;
std::vector<std::string> oarr(&options[0], &options[numOptions]);
std::vector<std::string> oarr;
oarr.reserve(numOptions + 12);
const std::string hipVerOpt{"--hip-version=" + std::to_string(HIP_VERSION_MAJOR) + '.' +
std::to_string(HIP_VERSION_MINOR) + '.' +
@@ -269,6 +270,9 @@ hiprtcResult hiprtcCompileProgram(hiprtcProgram prog, int numOptions, const char
#endif
#endif
// Append the rest of options
oarr.insert(oarr.end(), &options[0], &options[numOptions]);
transformOptions(oarr, program);
std::copy(oarr.begin(), oarr.end(), std::ostream_iterator<std::string>(ostrstr, " "));