r316380 added support for the 'simulator' environment to LLVM's triple. Clang's driver should pass this to the compiler when -m<os>simulator-version-min option is specified so that the compiler can avoid using OS & arch specific checks.
Details
Diff Detail
- Repository
- rC Clang
Event Timeline
lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
1457–1465 | These checks should set the simulator target as well. |
lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
1457–1465 | This would break the __APPLE_EMBEDDED_SIMULATOR__ macro, as that has to be specified only when is used -m(iphone|tv|watch)simulator-version-min. Or should we still set __APPLE_EMBEDDED_SIMULATOR__ in the driver and allow -simulator even without -m(iphone|tv|watch)simulator-version-min? |
lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
1457–1465 | The intention is that using a target triple with "simulator" in the environment should replace the use of -m*simulator-version-min. |
Add "-simulator" environment even when -m*simulator-version-min isn't used using the arch/OS heuristic.
lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
1457–1465 | Alex pointed out to me that the subsequent call to setTarget takes care of setting the triple, so this is already doing what I wanted. |
These checks should set the simulator target as well.