diff --git a/projects/clr/hipamd/bin/hip_embed_pch.sh b/projects/clr/hipamd/bin/hip_embed_pch.sh index cc4f87a49a..0ea905a268 100755 --- a/projects/clr/hipamd/bin/hip_embed_pch.sh +++ b/projects/clr/hipamd/bin/hip_embed_pch.sh @@ -77,11 +77,9 @@ else tmpdir=/tmp fi -generate_pch() { - tmp=$tmpdir/hip_pch.$$ - mkdir -p $tmp - -cat >$tmp/hip_macros.h <$1 <$tmp/hip_macros.h <$tmp/hip_pch.h <$headerFile < $mcinFile if [[ $isWindows -eq 0 ]]; then echo " .type __hipRTC_header,@object" >> $mcinFile + echo " .type __hipRTC_header_size,@object" >> $mcinFile fi cat >>$mcinFile <> $tmp/hiprtc && $LLVM_DIR/bin/llvm-mc -o $tmp/hiprtc_header.o $tmp/hipRTC_header.mcin --filetype=obj && $LLVM_DIR/bin/clang $tmp/hiprtc_header.o -o $rtc_shared_lib_out -shared && + $LLVM_DIR/bin/clang -O3 --rocm-path=$HIP_INC_DIR/.. -std=c++14 -nogpulib -nogpuinc -emit-llvm -c -o $tmp/tmp.bc --cuda-device-only -D__HIPCC_RTC__ --offload-arch=gfx906 -x hip-cpp-output $tmp/hiprtc && rm -rf $tmp }