From 2e7d9a894dfecccfa06e16e505ad43a7160b088b Mon Sep 17 00:00:00 2001 From: ROCm CI Service Account <66695075+rocm-ci@users.noreply.github.com> Date: Wed, 21 Sep 2022 00:48:46 +0530 Subject: [PATCH] SWDEV-320512 - setup for enabling hipcc.bin by default (#2930) Change-Id: I6436b79b370434abc1250da560462c6d3398529d --- bin/hipcc | 7 ++++--- bin/hipconfig | 6 +++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/bin/hipcc b/bin/hipcc index 62191ffa4e..42fa1e8a20 100755 --- a/bin/hipcc +++ b/bin/hipcc @@ -28,7 +28,9 @@ use File::Basename; use File::Spec::Functions 'catfile'; # TODO: By default select perl script until change incorporated in HIP build script. -my $HIPCC_USE_PERL_SCRIPT = 1; +my $USE_PERL_SCRIPT = $ENV{'HIP_USE_PERL_SCRIPTS'}; +$USE_PERL_SCRIPT //= 1; # use defined-or assignment operator. Use env var, but if not defined default to 1. + my $isWindows = ($^O eq 'MSWin32' or $^O eq 'msys'); # escapes args with quotes SWDEV-341955 foreach $arg (@ARGV) { @@ -38,8 +40,7 @@ foreach $arg (@ARGV) { } my $SCRIPT_DIR=dirname(__FILE__); - -if ($HIPCC_USE_PERL_SCRIPT) { +if ($USE_PERL_SCRIPT) { #Invoke hipcc.pl my $HIPCC_PERL=catfile($SCRIPT_DIR, '/hipcc.pl'); system($^X, $HIPCC_PERL, @ARGV); diff --git a/bin/hipconfig b/bin/hipconfig index 6bb4f892f8..d50b10b94a 100755 --- a/bin/hipconfig +++ b/bin/hipconfig @@ -28,11 +28,11 @@ use File::Basename; use File::Spec::Functions 'catfile'; #TODO: By default select perl script until change incorporated in HIP build script -my $HIPCONFIG_USE_PERL_SCRIPT = 1; +my $USE_PERL_SCRIPT = $ENV{'HIP_USE_PERL_SCRIPTS'}; +$USE_PERL_SCRIPT //= 1; # use defined-or assignment operator. Use env var, but if not defined default to 1. my $isWindows = ($^O eq 'MSWin32' or $^O eq 'msys'); my $SCRIPT_DIR=dirname(__FILE__); - -if ($HIPCONFIG_USE_PERL_SCRIPT) { +if ($USE_PERL_SCRIPT) { #Invoke hipconfig.pl my $HIPCONFIG_PERL=catfile($SCRIPT_DIR, '/hipconfig.pl'); system($^X, $HIPCONFIG_PERL, @ARGV);