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

Bruno Cardoso Lopes via cfe-commits cfe-commits at lists.llvm.org
Mon Apr 4 10:34:28 PDT 2016


bruno added a subscriber: bruno.
bruno added a comment.

Hi Andrey,


================
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>;
----------------
You can remove the "." to be consistent with the other flags help text.

================
Comment at: lib/Driver/Driver.cpp:283
@@ +282,3 @@
+      continue;
+    }
+
----------------
You probably don't need this - turning -static on as you do some lines below should be enough to output a warning if -dynamic is specified - see CheckCodeGenerationOptions.

================
Comment at: lib/Driver/Driver.cpp:387
@@ +386,3 @@
+      D.Diag(diag::err_drv_argument_not_allowed_with)
+          << "-miamcu" << A->getBaseArg().getAsString(Args);
+
----------------
What happens if -m32 isn't specified and the target is != x86?

================
Comment at: lib/Driver/Tools.cpp:2130
@@ -2122,3 +2129,3 @@
 }
 
 void Clang::AddHexagonTargetArgs(const ArgList &Args,
----------------
One potential place you could be missing: maybe getX86TargetCPU should return Lakemont when OPT_miamcu is on? or is this coming in another patch?


http://reviews.llvm.org/D18398





More information about the cfe-commits mailing list