From 58246c78d730320be172dfe168bf15ac16603dd8 Mon Sep 17 00:00:00 2001 From: Aaron Enye Shi Date: Tue, 13 Jul 2021 12:29:59 -0400 Subject: [PATCH] SWDEV-283267 - HIPRTC Pass COMGR correct msvc flags On Windows, to enable comgr and hiprtc to enable compilation, provide the correct target flags. Otherwise comgr cannot figure out which platform to compile for. Change-Id: I6426e518c8d695342cb49df0ebdeac0437da83df --- hipamd/src/hip_rtc.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hipamd/src/hip_rtc.cpp b/hipamd/src/hip_rtc.cpp index ca609a5a52..163c64334f 100755 --- a/hipamd/src/hip_rtc.cpp +++ b/hipamd/src/hip_rtc.cpp @@ -295,6 +295,11 @@ hiprtcResult hiprtcCompileProgram(hiprtcProgram prog, int numOptions, const char oarr.push_back("-include hiprtc_runtime.h"); oarr.push_back("-std=c++14"); oarr.push_back("-nogpuinc"); +#ifdef _WIN32 + oarr.push_back("-target x86_64-pc-windows-msvc"); + oarr.push_back("-fms-extensions"); + oarr.push_back("-fms-compatibility"); +#endif #endif transformOptions(oarr, program);