Skip to content

Commit bd7a830

Browse files
Merge pull request #90 from ROCm-Developer-Tools/develop
merge develop into mainline
2 parents d48f284 + 3ff7432 commit bd7a830

File tree

6 files changed

+18
-13
lines changed

6 files changed

+18
-13
lines changed

amd/hipcc/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ if(NOT WIN32)
4141
endif()
4242

4343
# Copy scripts and batch files to build directory.
44-
file(COPY ${CMAKE_SOURCE_DIR}/bin/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
44+
file(COPY ${PROJECT_SOURCE_DIR}/bin/ DESTINATION ${PROJECT_BINARY_DIR})
4545

4646
set(CPACK_GENERATOR "DEB;RPM;ZIP" CACHE STRING "Default packaging generators")
4747
set(CPACK_PACKAGE_CONTACT "ROCm Compiler Support <[email protected]>")
@@ -67,7 +67,7 @@ endif()
6767
set(CPACK_RPM_FILE_NAME "RPM-DEFAULT")
6868
set(CPACK_RPM_PACKAGE_LICENSE "MIT")
6969
set(CPACK_RPM_PACKAGE_REQUIRES "perl >= 5.0, perl-File-BaseDir, hip-devel, rocm-core, rocm-llvm")
70-
set(CPACK_RPM_PACKAGE_AUTOREQROV 0)
70+
set(CPACK_RPM_PACKAGE_AUTOREQPROV 0)
7171
if(DEFINED ENV{CPACK_RPM_PACKAGE_RELEASE})
7272
set(CPACK_RPM_PACKAGE_RELEASE $ENV{CPACK_RPM_PACKAGE_RELEASE})
7373
else()
@@ -126,4 +126,9 @@ if(NOT WIN32)
126126
endif()
127127
endif()
128128

129+
if(NOT ROCM_DEP_ROCMCORE)
130+
string(REGEX REPLACE ",? ?rocm-core" "" CPACK_DEBIAN_PACKAGE_DEPENDS ${CPACK_DEBIAN_PACKAGE_DEPENDS})
131+
string(REGEX REPLACE ",? ?rocm-core" "" CPACK_RPM_PACKAGE_REQUIRES ${CPACK_RPM_PACKAGE_REQUIRES})
132+
endif()
133+
129134
include(CPack)

amd/hipcc/bin/hipconfig.pl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,16 @@ BEGIN
6464
);
6565

6666
if ($HIP_COMPILER eq "clang") {
67-
$HIP_CLANG_VERSION = "";
67+
$HIP_CLANG_INCLUDE = "";
6868
if($isWindows) {
69-
$HIP_CLANG_VERSION = `\"$HIP_CLANG_PATH/clang++\" --version`;
69+
$HIP_CLANG_INCLUDE = `\"$HIP_CLANG_PATH/clang++\" --print-resource-dir`;
7070
} else {
71-
$HIP_CLANG_VERSION = `$HIP_CLANG_PATH/clang++ --version`;
71+
$HIP_CLANG_INCLUDE = `$HIP_CLANG_PATH/clang++ --print-resource-dir`;
7272
}
73-
$HIP_CLANG_VERSION=~/.*clang version (\S+).*/;
74-
$HIP_CLANG_VERSION=$1;
7573

7674
$CPP_CONFIG = " -D__HIP_PLATFORM_HCC__= -D__HIP_PLATFORM_AMD__=";
7775

7876
$HIP_PATH_INCLUDE = $HIP_PATH."/include";
79-
$HIP_CLANG_INCLUDE = $HIP_CLANG_PATH."/../lib/clang/".$HIP_CLANG_VERSION;
8077
if($isWindows) {
8178
$CPP_CONFIG .= " -I\"$HIP_PATH_INCLUDE\" -I\"$HIP_CLANG_INCLUDE\"";
8279
} else {

amd/hipcc/bin/hipvars.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ if (-e "$HIP_PATH/bin/rocm_agent_enumerator") {
8383
}
8484
$CUDA_PATH=$ENV{'CUDA_PATH'} // '/usr/local/cuda';
8585

86-
# Windows has a different structure, all binaries are inside hip/bin
87-
if ($isWindows) {
86+
# Windows/Distro's have a different structure, all binaries are with hipcc
87+
if (-e "$HIP_PATH/bin/clang" or -e "$HIP_PATH/bin/clang.exe") {
8888
$HIP_CLANG_PATH=$ENV{'HIP_CLANG_PATH'} // "$HIP_PATH/bin";
8989
} else {
9090
$HIP_CLANG_PATH=$ENV{'HIP_CLANG_PATH'} // "$ROCM_PATH/llvm/bin";
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rocm-docs-core==0.13.4
1+
rocm-docs-core==0.14.0

amd/hipcc/docs/.sphinx/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ requests==2.28.2
9494
# via
9595
# pygithub
9696
# sphinx
97-
rocm-docs-core==0.13.4
97+
rocm-docs-core==0.14.0
9898
# via -r requirements.in
9999
smmap==5.0.0
100100
# via gitdb

amd/hipcc/src/hipBin_amd.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,14 @@ void HipBinAmd::constructCompilerPath() {
218218
if (osInfo == windows) {
219219
complierPath = getHipPath();
220220
hipClangPath = complierPath;
221-
hipClangPath /= "bin";
222221
} else {
223222
complierPath = getRoccmPath();
224223
hipClangPath = complierPath;
224+
}
225+
if (fs::exists("llvm/bin/clang++")) {
225226
hipClangPath /= "llvm/bin";
227+
} else {
228+
hipClangPath /= "bin";
226229
}
227230
complierPath = hipClangPath.string();
228231
} else {

0 commit comments

Comments
 (0)