From 764690b8a883c9466324f9c33ab1047a0661e8ef Mon Sep 17 00:00:00 2001 From: Andrzej Warzynski Date: Thu, 10 Dec 2020 11:46:35 +0000 Subject: [PATCH] [clang] Remove `-triple` from the invocations of `flang-new -fc1` This is just a small change in the Flang tool within libclangDriver. Currently it passes `-triple` when calling `flang-new -fc1` for various driver Jobs. As there is no support for code-generation, `-triple` is not required and should remain unsupported. It is safe to remove it. This hasn't been a problem as the affected driver Jobs are not yet implemented or used. However, we will be adding support for them in the near future and the fact `-triple` is added will become a problem. Differential Revision: https://reviews.llvm.org/D93027 --- clang/lib/Driver/ToolChains/Flang.cpp | 2 -- clang/test/Driver/flang/flang.f90 | 1 - clang/test/Driver/flang/flang_ucase.F90 | 1 - 3 files changed, 4 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Flang.cpp b/clang/lib/Driver/ToolChains/Flang.cpp index 6d79fbe6aa8f..d7dee9594e45 100644 --- a/clang/lib/Driver/ToolChains/Flang.cpp +++ b/clang/lib/Driver/ToolChains/Flang.cpp @@ -40,8 +40,6 @@ void Flang::ConstructJob(Compilation &C, const JobAction &JA, else CmdArgs.push_back("-E"); } else if (isa(JA) || isa(JA)) { - CmdArgs.push_back("-triple"); - CmdArgs.push_back(Args.MakeArgString(TripleStr)); if (JA.getType() == types::TY_Nothing) { CmdArgs.push_back("-fsyntax-only"); } else if (JA.getType() == types::TY_AST) { diff --git a/clang/test/Driver/flang/flang.f90 b/clang/test/Driver/flang/flang.f90 index e4629d527d18..9b16f233b231 100644 --- a/clang/test/Driver/flang/flang.f90 +++ b/clang/test/Driver/flang/flang.f90 @@ -23,7 +23,6 @@ ! CHECK-E-DAG: "-o" "-" ! RUN: %clang --driver-mode=flang -### -emit-ast %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-AST %s -! CHECK-EMIT-AST-DAG: "-triple" ! CHECK-EMIT-AST-DAG: "-emit-ast" ! CHECK-EMIT-AST-DAG: "-o" "{{[^"]*}}.ast" diff --git a/clang/test/Driver/flang/flang_ucase.F90 b/clang/test/Driver/flang/flang_ucase.F90 index 4da09e138b59..113ef75f45b8 100644 --- a/clang/test/Driver/flang/flang_ucase.F90 +++ b/clang/test/Driver/flang/flang_ucase.F90 @@ -23,7 +23,6 @@ ! CHECK-E-DAG: "-o" "-" ! RUN: %clang --driver-mode=flang -### -emit-ast %s 2>&1 | FileCheck --check-prefixes=ALL,CHECK-EMIT-AST %s -! CHECK-EMIT-AST-DAG: "-triple" ! CHECK-EMIT-AST-DAG: "-emit-ast" ! CHECK-EMIT-AST-DAG: "-o" "{{[^"]*}}.ast"