SWDEV-285685 - Make sure the output of hipconfig is without quotes on linux
Change-Id: I620cd41c7e6087b0d3d7da9ef7f9cecaf2f740ba
This commit is contained in:
+17
-7
@@ -64,15 +64,23 @@ GetOptions(
|
|||||||
);
|
);
|
||||||
|
|
||||||
if ($HIP_COMPILER eq "clang") {
|
if ($HIP_COMPILER eq "clang") {
|
||||||
$HIP_CLANG_VERSION = `\"$HIP_CLANG_PATH/clang++\" --version`;
|
$HIP_CLANG_VERSION = "";
|
||||||
|
if($isWindows) {
|
||||||
|
$HIP_CLANG_VERSION = `\"$HIP_CLANG_PATH/clang++\" --version`;
|
||||||
|
} else {
|
||||||
|
$HIP_CLANG_VERSION = `$HIP_CLANG_PATH/clang++ --version`;
|
||||||
|
}
|
||||||
$HIP_CLANG_VERSION=~/.*clang version (\S+).*/;
|
$HIP_CLANG_VERSION=~/.*clang version (\S+).*/;
|
||||||
$HIP_CLANG_VERSION=$1;
|
$HIP_CLANG_VERSION=$1;
|
||||||
|
|
||||||
$CPP_CONFIG = " -D__HIP_PLATFORM_HCC__= -D__HIP_PLATFORM_AMD__= -I\"$HIP_PATH/include\" -I\"$HIP_CLANG_PATH/../lib/clang/$HIP_CLANG_VERSION\"";
|
$CPP_CONFIG = " -D__HIP_PLATFORM_HCC__= -D__HIP_PLATFORM_AMD__=";
|
||||||
|
|
||||||
# HIP on Windows does not need HSA_PATH
|
$HIP_PATH_INCLUDE = $HIP_PATH."/include";
|
||||||
if (not $isWindows) {
|
$HIP_CLANG_INCLUDE = $HIP_CLANG_PATH."/../lib/clang/".$HIP_CLANG_VERSION;
|
||||||
$CPP_CONFIG .= " -I$HSA_PATH/include";
|
if($isWindows) {
|
||||||
|
$CPP_CONFIG .= " -I\"$HIP_PATH_INCLUDE\" -I\"$HIP_CLANG_INCLUDE\"";
|
||||||
|
} else {
|
||||||
|
$CPP_CONFIG .= " -I$HIP_PATH_INCLUDE -I$HIP_CLANG_INCLUDE -I$HSA_PATH/include";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($HIP_PLATFORM eq "nvidia") {
|
if ($HIP_PLATFORM eq "nvidia") {
|
||||||
@@ -157,9 +165,9 @@ if (!$printed or $p_full) {
|
|||||||
print ("HSA_PATH : $HSA_PATH\n");
|
print ("HSA_PATH : $HSA_PATH\n");
|
||||||
}
|
}
|
||||||
print ("HIP_CLANG_PATH : $HIP_CLANG_PATH\n");
|
print ("HIP_CLANG_PATH : $HIP_CLANG_PATH\n");
|
||||||
system("\"$HIP_CLANG_PATH/clang++\" --version");
|
|
||||||
system("\"$HIP_CLANG_PATH/llc\" --version");
|
|
||||||
if ($isWindows) {
|
if ($isWindows) {
|
||||||
|
system("\"$HIP_CLANG_PATH/clang++\" --version");
|
||||||
|
system("\"$HIP_CLANG_PATH/llc\" --version");
|
||||||
printf("hip-clang-cxxflags : ");
|
printf("hip-clang-cxxflags : ");
|
||||||
$win_output = `perl \"$HIP_PATH/bin/hipcc\" --cxxflags`;
|
$win_output = `perl \"$HIP_PATH/bin/hipcc\" --cxxflags`;
|
||||||
printf("$win_output \n");
|
printf("$win_output \n");
|
||||||
@@ -167,6 +175,8 @@ if (!$printed or $p_full) {
|
|||||||
$win_output = `perl \"$HIP_PATH/bin/hipcc\" --ldflags`;
|
$win_output = `perl \"$HIP_PATH/bin/hipcc\" --ldflags`;
|
||||||
printf("$win_output \n");
|
printf("$win_output \n");
|
||||||
} else {
|
} else {
|
||||||
|
system("$HIP_CLANG_PATH/clang++ --version");
|
||||||
|
system("$HIP_CLANG_PATH/llc --version");
|
||||||
print ("hip-clang-cxxflags : ");
|
print ("hip-clang-cxxflags : ");
|
||||||
system("$HIP_PATH/bin/hipcc --cxxflags");
|
system("$HIP_PATH/bin/hipcc --cxxflags");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user