diff --git a/projects/clr/hipamd/bin/hip_embed_pch.sh b/projects/clr/hipamd/bin/hip_embed_pch.sh index a4cb64c972..6ec5568809 100755 --- a/projects/clr/hipamd/bin/hip_embed_pch.sh +++ b/projects/clr/hipamd/bin/hip_embed_pch.sh @@ -71,8 +71,10 @@ else fi if [[ "$OSTYPE" == cygwin || "$OSTYPE" == msys ]]; then + isWindows=1 tmpdir=. else + isWindows=0 tmpdir=/tmp fi @@ -132,13 +134,19 @@ EOF generate_rtc_header() { tmp=$tmpdir/hip_rtc.$$ mkdir -p $tmp + local headerFile="$tmp/hipRTC_header.h" + local mcinFile="$tmp/hipRTC_header.mcin" -cat >$tmp/hipRTC_header.h <$headerFile <$tmp/hipRTC_header.mcin < $mcinFile + if [[ $isWindows -eq 0 ]]; then + echo " .type __hipRTC_header,@object" >> $mcinFile + fi +cat >>$mcinFile <