Revise compile flag of gdb test for hip program.
authorQingchuan Shi <qingchuan.shi@amd.com>
Fri, 10 Apr 2020 18:07:51 +0000 (14:07 -0400)
committerLaurent Morichetti <laurent.morichetti@amd.com>
Wed, 6 May 2020 20:50:55 +0000 (13:50 -0700)
Change-Id: If6ecba593b6637340650fa9704edb2b30832e9f9

gdb/testsuite/lib/gdb.exp

index cb5a3f7aeaf295304ff77a79d49617f86e0bba0b..83864ab693049ca9bea6cdbbdefa95bf06d7b4c4 100644 (file)
@@ -3716,6 +3716,8 @@ proc gdb_compile {source dest type options} {
     set new_options {}
     if {[lsearch -exact $options rust] != -1} {
        # -fdiagnostics-color is not a rustcc option.
+    } elseif {[lsearch -exact $options hip] != -1} { 
+       # -fdiagnostics-color is not a hipcc option.
     } else {
        set new_options [universal_compile_options]
     }
@@ -3778,11 +3780,16 @@ proc gdb_compile {source dest type options} {
         && [test_compiler_info {gcc-*-*}]
         && !([test_compiler_info {gcc-[0-3]-*}]
              || [test_compiler_info {gcc-4-0-*}])
-        && [lsearch -exact $options rust] == -1} {
+        && [lsearch -exact $options rust] == -1
+        && [lsearch -exact $options hip] == -1} {
         # Put it at the front to not override any user-provided value.
         lappend new_options "early_flags=-fno-stack-protector"
     }
 
+   if {[lsearch -exact $options hip] != -1} {
+        lappend new_options "early_flags=-O0 -ggdb"
+    }
+
     # Because we link with libraries using their basename, we may need
     # (depending on the platform) to set a special rpath value, to allow
     # the executable to find the libraries it depends on.
@@ -6684,7 +6691,7 @@ proc cd { dir } {
 # 'auto' keywords.
 proc gdb_supported_languages {} {
     return [list c objective-c c++ d go fortran modula-2 asm pascal \
-               opencl rust minimal ada]
+               opencl rust minimal ada hip]
 }
 
 # Check if debugging is enabled for gdb.
This page took 0.027244 seconds and 4 git commands to generate.