[PATCH] D41076: [driver][darwin] Set the 'simulator' environment when it's specified in '-target'

Bob Wilson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 15 20:50:20 PST 2017

bob.wilson accepted this revision.
bob.wilson added a comment.


Comment at: lib/Driver/ToolChains/Darwin.cpp:1603
   // Recognize iOS targets with an x86 architecture as the iOS simulator.
-  if (Platform != MacOS && (getTriple().getArch() == llvm::Triple::x86 ||
-                            getTriple().getArch() == llvm::Triple::x86_64))
+  if (Environment == NativeEnvironment && Platform != MacOS &&
+      (getTriple().getArch() == llvm::Triple::x86 ||
steven_wu wrote:
> Will be good to emit a warning for this. User should use -target with simulator or simulator deployment target.
Can we hold off on the warning and try to add that separately in the future? It would be good to first find out how often this code is being used. If there are a lot of uses, we may need to try to get people to stop relying on it before we add the warning. (I'm concerned about -Werror breaking builds with this.)

  rC Clang


More information about the cfe-commits mailing list