@@ -43,13 +43,14 @@ def preprocess(i):
4343 projects = 'clang;lld;compiler-rt;clang-tools-extra'
4444 runtimes = 'libcxx;libcxxabi;openmp'
4545
46+ q = "'"
4647 cmake_cmd = (
4748 f'cmake { os .path .join (src_path , "llvm" )} -GNinja'
4849 f' -DCMAKE_BUILD_TYPE=Release'
4950 f' -DCMAKE_INSTALL_PREFIX={ build_install_prefix } '
50- f' -DLLVM_ENABLE_PROJECTS=\" { projects } \" '
51- f' -DLLVM_ENABLE_RUNTIMES=\" { runtimes } \" '
52- f' -DLLVM_TARGETS_TO_BUILD={ targets } '
51+ f' -DLLVM_ENABLE_PROJECTS={ q } { projects } { q } '
52+ f' -DLLVM_ENABLE_RUNTIMES={ q } { runtimes } { q } '
53+ f' -DLLVM_TARGETS_TO_BUILD={ q } { targets } { q } '
5354 f' -DLLVM_ENABLE_RTTI=ON'
5455 f' -DLLVM_INSTALL_UTILS=ON'
5556 f' -DLLVM_ENABLE_ASSERTIONS=OFF'
@@ -132,11 +133,16 @@ def postprocess(i):
132133
133134 search_dirs = []
134135 for prefix in search_prefixes :
136+ # Standard package installs: /opt/rocm/bin, /opt/rocm-*/bin
135137 prefix_opt = os .path .join (prefix , 'opt' )
136138 if os .path .isdir (prefix_opt ):
137139 for p in [os .path .join (prefix_opt , 'rocm' , 'bin' )] + sorted (glob .glob (os .path .join (prefix_opt , 'rocm-*' , 'bin' )), reverse = True ):
138140 if os .path .isdir (p ) and p not in search_dirs :
139141 search_dirs .append (p )
142+ # Untar installs: <prefix>/rocm-*/bin (no opt/ subdirectory)
143+ for p in sorted (glob .glob (os .path .join (prefix , 'rocm-*' , 'bin' )), reverse = True ):
144+ if os .path .isdir (p ) and p not in search_dirs :
145+ search_dirs .append (p )
140146
141147 print (f" install_prefix = { install_prefix } " )
142148 print (f" cur_dir = { cur_dir } " )
0 commit comments