Building on D102489, default to Darwin_libsystem_m veclib on iOS based
targets.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Unit Tests
Event Timeline
clang/lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
2492 | libsystem_m's vector functions should be available on all Darwin platforms I think. I'd gradually opt-in additional platforms, once we verified it is clearly beneficial for each platform individually. Should I add a TODO? | |
clang/test/Driver/darwin-veclib-default.c | ||
9 | Ah OK! Would it make sense to check -darwin? Or just -iOS? |
clang/lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
2492 | Correct, available on all Darwin systems. These APIs were introduced in macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, and driverkit 19.0. I think we need a check that the target is at least those versions somewhere? |
clang/lib/Driver/ToolChains/Darwin.cpp | ||
---|---|---|
2492 | Yes we should check if the target version is supported in the Driver and error out if it's used for an earlier OS. | |
2492 | Sure, a FIXME comment for the other platform support is fine for now. | |
clang/test/Driver/darwin-veclib-default.c | ||
9 | Just ios. You're already checking darwin above. |
We are still evaluating whether it is safe to use this as default. I'll mark it as 'changes planned' for now.
As of now, I don't think this is safe to do with the precision guarantees Darwin_libsystem_m provides unfortunately.
Is this applicable to the watchOS targets as well? The iOS based check doesn't cover it.