r266753 - Revert r266747 (Compilation for Intel MCU (Part 1/3)) since it breaks a few buildbots.
Andrey Turetskiy via cfe-commits
cfe-commits at lists.llvm.org
Tue Apr 19 09:25:30 PDT 2016
Author: aturetsk
Date: Tue Apr 19 11:25:30 2016
New Revision: 266753
URL: http://llvm.org/viewvc/llvm-project?rev=266753&view=rev
Log:
Revert r266747 (Compilation for Intel MCU (Part 1/3)) since it breaks a few buildbots.
Removed:
cfe/trunk/test/Driver/miamcu-opt.c
Modified:
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/lib/Driver/Driver.cpp
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=266753&r1=266752&r2=266753&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Tue Apr 19 11:25:30 2016
@@ -1292,8 +1292,6 @@ def m3dnow : Flag<["-"], "m3dnow">, Grou
def m64 : Flag<["-"], "m64">, Group<m_Group>, Flags<[DriverOption, CoreOption]>;
def mx32 : Flag<["-"], "mx32">, Group<m_Group>, Flags<[DriverOption, CoreOption]>;
def mabi_EQ : Joined<["-"], "mabi=">, Group<m_Group>;
-def miamcu : Flag<["-"], "miamcu">, Group<m_Group>, Flags<[DriverOption, CoreOption]>,
- HelpText<"Use Intel MCU ABI">;
def malign_functions_EQ : Joined<["-"], "malign-functions=">, Group<clang_ignored_m_Group>;
def malign_loops_EQ : Joined<["-"], "malign-loops=">, Group<clang_ignored_m_Group>;
def malign_jumps_EQ : Joined<["-"], "malign-jumps=">, Group<clang_ignored_m_Group>;
Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=266753&r1=266752&r2=266753&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Tue Apr 19 11:25:30 2016
@@ -278,10 +278,6 @@ DerivedArgList *Driver::TranslateInputAr
DAL->append(A);
}
- // Enforce -static if -miamcu is present.
- if (Args.hasArg(options::OPT_miamcu))
- DAL->AddFlagArg(0, Opts->getOption(options::OPT_static));
-
// Add a default value of -mlinker-version=, if one was given and the user
// didn't specify one.
#if defined(HOST_LINK_VERSION)
@@ -300,8 +296,7 @@ DerivedArgList *Driver::TranslateInputAr
///
/// This routine provides the logic to compute a target triple from various
/// args passed to the driver and the default triple string.
-static llvm::Triple computeTargetTriple(const Driver &D,
- StringRef DefaultTargetTriple,
+static llvm::Triple computeTargetTriple(StringRef DefaultTargetTriple,
const ArgList &Args,
StringRef DarwinArchName = "") {
// FIXME: Already done in Compilation *Driver::BuildCompilation
@@ -346,9 +341,8 @@ static llvm::Triple computeTargetTriple(
return Target;
// Handle pseudo-target flags '-m64', '-mx32', '-m32' and '-m16'.
- Arg *A = Args.getLastArg(options::OPT_m64, options::OPT_mx32,
- options::OPT_m32, options::OPT_m16);
- if (A) {
+ if (Arg *A = Args.getLastArg(options::OPT_m64, options::OPT_mx32,
+ options::OPT_m32, options::OPT_m16)) {
llvm::Triple::ArchType AT = llvm::Triple::UnknownArch;
if (A->getOption().matches(options::OPT_m64)) {
@@ -373,25 +367,6 @@ static llvm::Triple computeTargetTriple(
Target.setArch(AT);
}
- // Handle -miamcu flag.
- if (Args.hasArg(options::OPT_miamcu)) {
- if (Target.get32BitArchVariant().getArch() != llvm::Triple::x86)
- D.Diag(diag::err_drv_unsupported_opt_for_target) << "-miamcu"
- << Target.str();
-
- if (A && !A->getOption().matches(options::OPT_m32))
- D.Diag(diag::err_drv_argument_not_allowed_with)
- << "-miamcu" << A->getBaseArg().getAsString(Args);
-
- Target.setArch(llvm::Triple::x86);
- Target.setArchName("i586");
- Target.setEnvironment(llvm::Triple::UnknownEnvironment);
- Target.setEnvironmentName("");
- Target.setOS(llvm::Triple::ELFIAMCU);
- Target.setVendor(llvm::Triple::UnknownVendor);
- Target.setVendorName("intel");
- }
-
return Target;
}
@@ -526,8 +501,8 @@ Compilation *Driver::BuildCompilation(Ar
DerivedArgList *TranslatedArgs = TranslateInputArgs(*UArgs);
// Owned by the host.
- const ToolChain &TC = getToolChain(
- *UArgs, computeTargetTriple(*this, DefaultTargetTriple, *UArgs));
+ const ToolChain &TC =
+ getToolChain(*UArgs, computeTargetTriple(DefaultTargetTriple, *UArgs));
// The compilation takes ownership of Args.
Compilation *C = new Compilation(*this, TC, UArgs.release(), TranslatedArgs);
@@ -2006,9 +1981,9 @@ InputInfo Driver::BuildJobsForActionNoCa
const char *ArchName = BAA->getArchName();
if (ArchName)
- TC = &getToolChain(C.getArgs(),
- computeTargetTriple(*this, DefaultTargetTriple,
- C.getArgs(), ArchName));
+ TC = &getToolChain(
+ C.getArgs(),
+ computeTargetTriple(DefaultTargetTriple, C.getArgs(), ArchName));
else
TC = &C.getDefaultToolChain();
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=266753&r1=266752&r2=266753&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Apr 19 11:25:30 2016
@@ -2137,13 +2137,6 @@ void Clang::AddX86TargetArgs(const ArgLi
<< A->getOption().getName() << Value;
}
}
-
- // Set flags to support MCU ABI.
- if (Args.hasArg(options::OPT_miamcu)) {
- CmdArgs.push_back("-mfloat-abi");
- CmdArgs.push_back("soft");
- CmdArgs.push_back("-mstack-alignment=4");
- }
}
void Clang::AddHexagonTargetArgs(const ArgList &Args,
Removed: cfe/trunk/test/Driver/miamcu-opt.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/miamcu-opt.c?rev=266752&view=auto
==============================================================================
--- cfe/trunk/test/Driver/miamcu-opt.c (original)
+++ cfe/trunk/test/Driver/miamcu-opt.c (removed)
@@ -1,21 +0,0 @@
-// RUN: %clang -miamcu %s -### -o %t.o 2>&1 | FileCheck %s
-// RUN: %clang -miamcu -m32 %s -### -o %t.o 2>&1 | FileCheck %s
-// RUN: %clang -miamcu -target x86_64-unknown-linux-gnu %s -### -o %t.o 2>&1 | FileCheck %s
-// RUN: %clang -miamcu -m64 %s -### -o %t.o 2>&1 | FileCheck %s -check-prefix=M64
-// RUN: %clang -miamcu -dynamic %s -### -o %t.o 2>&1 | FileCheck %s -check-prefix=DYNAMIC
-// RUN: %clang -miamcu -target armv8-eabi %s -### -o %t.o 2>&1 | FileCheck %s -check-prefix=NOT-X86
-
-// M64: error: invalid argument '-miamcu' not allowed with '-m64'
-
-// DYNAMIC: error: invalid argument '-dynamic' not allowed with '-static'
-
-// NOT-X86: error: unsupported option '-miamcu' for target 'armv8---eabi'
-
-// CHECK: "-cc1"
-// CHECK: "-triple" "i586-intel-elfiamcu"
-// CHECK: "-static-define"
-// CHECK: "-mfloat-abi" "soft"
-// CHECK: "-mstack-alignment=4"
-
-// CHECK: bin/gcc
-// CHECK: "-static"
More information about the cfe-commits
mailing list