Do not change opt level for -g for hip-clang (#1369)

Currently hipcc uses -O3 for hip-clang by default but uses -O0 if -g is used. This
causes surprise for users since -g should not affect default opt level.
このコミットが含まれているのは:
Yaxun (Sam) Liu
2019-08-28 21:03:11 -04:00
committed by Maneesh Gupta
コミット b046ec698b
+1 -6
ファイルの表示
@@ -383,7 +383,6 @@ if($HIP_PLATFORM eq "nvcc"){
my $toolArgs = ""; # arguments to pass to the hcc or nvcc tool
my $optArg = ""; # -O args
my $gArg = ""; # -g args
foreach $arg (@ARGV)
{
@@ -494,10 +493,6 @@ foreach $arg (@ARGV)
{
$optArg = $arg;
}
if($arg =~ m/^-g/)
{
$gArg = $arg;
}
## process linker response file for hip-clang
## extract object files from static library and pass them directly to
@@ -876,7 +871,7 @@ if ($needHipHcc) {
if ($HIP_PLATFORM eq "clang") {
# Set default optimization level to -O3 for hip-clang.
if ($optArg eq "" and $gArg ne "-g") {
if ($optArg eq "") {
$HIPCXXFLAGS .= " -O3";
$HIPLDFLAGS .= " -O3";
}