[PATCH] D18398: Compilation for Intel MCU (Part 1/3)

Andrey Turetskiy via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 6 07:32:14 PDT 2016


aturetsk added a comment.

Hi Bruno,

Thanks for the review.


================
Comment at: include/clang/Driver/Options.td:1281
@@ -1280,1 +1280,3 @@
+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>;
----------------
Fixed.

================
Comment at: lib/Driver/Driver.cpp:282
@@ +281,3 @@
+  // Enforce -static if -miamcu is present.
+  if (Args.hasArg(options::OPT_miamcu))
+    DAL->AddFlagArg(0, Opts->getOption(options::OPT_static));
----------------
You're right.
The warning was removed and the test was updated.

================
Comment at: lib/Driver/Driver.cpp:380
@@ +379,3 @@
+      D.Diag(diag::err_drv_unsupported_opt_for_target) << "-miamcu"
+                                                       << Target.str();
+
----------------
I made driver to show an error if '-miamcu' is used with anything but x86.
The corresponding test was added.

================
Comment at: lib/Driver/Tools.cpp:2130
@@ -2122,3 +2129,3 @@
 }
 
 void Clang::AddHexagonTargetArgs(const ArgList &Args,
----------------
No, the idea is for -miamcu to specify only ABI and it shouldn't be bound to Lakemont at all. Which target CPU to use is the choice of the user and it should be explicitly specified through -march.
I believe GCC does the same.


http://reviews.llvm.org/D18398





More information about the cfe-commits mailing list