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

Steven Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 15 16:11:49 PST 2017

steven_wu added a comment.

Other than the comment inline, LGTM.

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 ||
Will be good to emit a warning for this. User should use -target with simulator or simulator deployment target.

  rC Clang


More information about the cfe-commits mailing list