Skip to content

Commit 703913c

Browse files
committed
fixup! gdb/testsuite: replace hipcc with amdclang++ as the HIP compiler
1 parent 5cbdde7 commit 703913c

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

gdb/testsuite/lib/gdb.exp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6440,6 +6440,18 @@ proc gdb_compile {source dest type options} {
64406440
global objdir
64416441
global gdb_saved_set_unbuffered_mode_obj
64426442

6443+
# hipcc's --genco (generate a standalone device code object) has
6444+
# no direct amdclang++ spelling; the equivalent is
6445+
# --cuda-device-only. Translate it here, before the options are
6446+
# processed, so testcases can keep using the portable --genco.
6447+
if {[lsearch -exact $options hip] != -1} {
6448+
set genco_idx [lsearch -exact $options "additional_flags=--genco"]
6449+
if {$genco_idx != -1} {
6450+
set options [lreplace $options $genco_idx $genco_idx \
6451+
"additional_flags=--cuda-device-only"]
6452+
}
6453+
}
6454+
64436455
if {[lsearch -exact $options hip] != -1
64446456
&& [istarget "*-*-mingw*"]} {
64456457
# target_compile by default links with -lm, if the target

0 commit comments

Comments
 (0)