File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -483,7 +483,23 @@ ParsedClangName
483483ToolChain::getTargetAndModeFromProgramName (StringRef PN) {
484484 std::string ProgName = normalizeProgramName (PN);
485485 size_t SuffixPos;
486+ bool FlangNew = false ;
486487 const DriverSuffix *DS = parseDriverSuffix (ProgName, SuffixPos);
488+
489+ // Part II: Warn if invocation happens with flang-new (for Flang); this is for
490+ // the time being and should be removed once AMD Classic Flang has been
491+ // removed from ROCm.
492+ if (FlangNew) {
493+ // flang-new warning is overwarning, disabling until fixed.
494+ if (false && !::getenv (" AMD_NOWARN_FLANG_NEW" )) {
495+ // The solution with "llvm::errs()" is not ideal, but the driver object
496+ // is not been constructed yet, so we cannot use the Diag() infrastructure
497+ // for this.
498+ llvm::errs () << " warning: the 'amdflang-new' and 'flang-new' commmands "
499+ " have been deprecated; please use 'amdflang' instead\n " ;
500+ }
501+ }
502+
487503 if (!DS)
488504 return {};
489505 size_t SuffixEnd = SuffixPos + strlen (DS->Suffix );
Original file line number Diff line number Diff line change 1+ ! RUN: amdflang-new -c %s 2>&1 | FileCheck %s
2+ ! CHECK: warning: the 'amdflang-new' and 'flang-new' commmands have been deprecated; please use 'amdflang' instead
3+ ! XFAIL: *
You can’t perform that action at this time.
0 commit comments