[PATCH] D54883: [Support/FileSystem] Use st_atimespec only when __APPLE__ is defined

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 2 07:01:19 PST 2018


krytarowski added a comment.

In D54883#1315851 <https://reviews.llvm.org/D54883#1315851>, @thakis wrote:

> - The feature test macros generally do have two downsides:
>   1. They can have false positives. We had one bug where the feature detection for mmap() was accidentally true on Windows which lead to pretty bad behavior.


This is a sign that feature detection was done wrongly, not that it's inferior to hardcoding.

There are narrow cases when it's difficult to detect some features with feature macros, but it's not this case.

> 2. They slow down cmake. Every single check probably not a ton, but running cmake on my system takes minutes, much of this time doing feature checks that return the same every time.

It's a marginal cost of compatibility.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54883/new/

https://reviews.llvm.org/D54883





More information about the llvm-commits mailing list