Is there a way to run with --aot-only on the iOS S

2019-06-20 12:42发布

When I test my app directly on the device, it crashes because I'm attempting to JIT-compile a method. I know why these crashes occur, I'm just trying to make them appear when I'm testing on the simulator instead. It's much easier than deploying to a device every time (it also takes less time).

I tried adding --aot-only to the mtouch arguments but I get the "Unknown command line argument" error.

1条回答
Juvenile、少年°
2楼-- · 2019-06-20 13:42

No, there's no AOT compiler shipped for x86.

Now even if there was one it would:

a) become a lot slower to build. In fact it would be similar to building for devices. The only time saved would be for deployment (which is not the largest part of the build/deploy time);

b) still give you different results than iOS devices. The iOS simulator is, in many ways, different than iOS devices so testing on devices is very important.

Notes:

  • A lot of the JIT exceptions are related to the use of value-types inside generics. This is being, in large part, fixed in the 6.3.x releases (beta);

  • There are tricks to make your device builds faster. You can find some here in stackoverflow and (soon) the video about my Evolve 2013 presentation should be available.

查看更多
登录 后发表回答