SWDEV-273235 - Initial support for Windows CMake

This change is tied to the ROCclr cmake rework. ROCclr will now be built
as part of HIP itself.

All the dependencies on comgr and rocr have been moved into ROCclr
itself. This allows HIP to pull in all the required compiler/runtime
dependencies by simply linking against ROCclr. Note that ROCclr needs to
be configured from HIP cmake command line. If not, we will default to
LC + ROCr support.

Since HIP depends on ROCclr and ROCclr depends on OpenCL, HIP will
transitevly pull in all the required OpenCL headers. No need to keep a
local copy of them anymore.

Change-Id: Ib39f4929e88da1248be962490c150b10fc7abd3a
This commit is contained in:
Vladislav Sytchenko
2021-05-11 14:21:34 -04:00
parent 093af3cf25
commit 30f1fcaf53
31 changed files with 3481 additions and 10638 deletions
+7 -8
View File
@@ -21,7 +21,7 @@
printUsage() {
echo
echo "Usage: $(basename "$0") HIP_BUILD_INC_DIR HIP_INC_DIR LLVM_DIR HSA_DIR [option] [RTC_LIB_OUTPUT]"
echo "Usage: $(basename "$0") HIP_BUILD_INC_DIR HIP_INC_DIR LLVM_DIR [option] [RTC_LIB_OUTPUT]"
echo
echo "Options:"
echo " -p, --generate_pch Generate pre-compiled header (default)"
@@ -40,13 +40,12 @@ fi
HIP_BUILD_INC_DIR="$1"
HIP_INC_DIR="$2"
LLVM_DIR="$3"
HSA_DIR="$4"
# By default, generate pch
TARGET="generatepch"
while [ "$5" != "" ];
while [ "$4" != "" ];
do
case "$5" in
case "$4" in
-h | --help )
printUsage ; exit 0 ;;
-p | --generate_pch )
@@ -54,14 +53,14 @@ do
-r | --generate_rtc )
TARGET="generatertc" ; break ;;
*)
echo " UNEXPECTED ERROR Parm : [$5] ">&2 ; exit 20 ;;
echo " UNEXPECTED ERROR Parm : [$4] ">&2 ; exit 20 ;;
esac
shift 1
done
# Allow hiprtc lib name to be set by argument 6
if [[ "$6" != "" ]]; then
rtc_shared_lib_out="$6"
if [[ "$5" != "" ]]; then
rtc_shared_lib_out="$5"
else
if [[ "$OSTYPE" == cygwin ]]; then
rtc_shared_lib_out=hiprtc-builtins64.dll
@@ -120,7 +119,7 @@ EOF
set -x
$LLVM_DIR/bin/clang -O3 --rocm-path=$HIP_INC_DIR/.. -std=c++17 -nogpulib -isystem $HIP_INC_DIR -isystem $HIP_BUILD_INC_DIR -isystem $HSA_DIR/include --cuda-device-only -x hip $tmp/hip_pch.h -E >$tmp/pch.cui &&
$LLVM_DIR/bin/clang -O3 --rocm-path=$HIP_INC_DIR/.. -std=c++17 -nogpulib -isystem $HIP_INC_DIR -isystem $HIP_BUILD_INC_DIR --cuda-device-only -x hip $tmp/hip_pch.h -E >$tmp/pch.cui &&
cat $tmp/hip_macros.h >> $tmp/pch.cui &&