From 4a9793e2e2cbc45c1363ea7ff8e876dcebbf4c72 Mon Sep 17 00:00:00 2001 From: Reshabh Sharma <60782296+rksharma-yymd@users.noreply.github.com> Date: Tue, 17 Mar 2020 14:01:33 +0530 Subject: [PATCH] Don't force compiler to treat libhip_hcc.so as a text file (#1931) Fixes SWDEV-226025, Right now -x c++ can come before libhip_hcc.so which forces the compiler to treat libhip_hcc.so as a text file and generates a lot of gibberish unicode. This PR changes the order of flags ensuring that -x c++ and similar flags come after libhip_hcc.so Hopefully, this will not have any negative side effect. --- hipamd/bin/hipcc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hipamd/bin/hipcc b/hipamd/bin/hipcc index bc75501621..26ea4114eb 100755 --- a/hipamd/bin/hipcc +++ b/hipamd/bin/hipcc @@ -735,12 +735,12 @@ if ($HIPCC_LINK_FLAGS_APPEND) { } my $CMD="$HIPCC"; -if ($needCXXFLAGS) { - $CMD .= " $HIPCXXFLAGS"; -} if ($needLDFLAGS and not $compileOnly) { $CMD .= " $HIPLDFLAGS"; } +if ($needCXXFLAGS) { + $CMD .= " $HIPCXXFLAGS"; +} $CMD .= " $toolArgs"; if ($verbose & 0x1) {