Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libcxx] Set _LIBCPP_HAS_CLOCK_GETTIME for GPU targets #99243

Merged
merged 2 commits into from
Aug 14, 2024

Commits on Jul 31, 2024

  1. [libcxx] Set _LIBCPP_HAS_CLOCK_GETTIME for GPU targets

    Summary:
    I am attempting to get the GPU to build and support libc++. One issue
    I've encountered is that it will look for `timeval` unless this macro is
    set. We can support `CLOCK_MONOTONIC` on the GPU fairly easily as we
    have access to a fixed-frequency clock via `__builtin_readsteadycounter`
    intrinsics with a known frequency. This also requires `CLOCK_REALTIME`
    which we can't support, but provide anyway from the GPU `libc` to make
    this happy. It will return an error so at least that will be obvious.
    
    I may need a more consistent configuration for this in the future, maybe
    I should put a common macro in a different common header that's just
    `__GPU__`? I don't know where I would put such a thing however.
    jhuber6 committed Jul 31, 2024
    Configuration menu
    Copy the full SHA
    aab10be View commit details
    Browse the repository at this point in the history

Commits on Aug 1, 2024

  1. Configuration menu
    Copy the full SHA
    04ffb56 View commit details
    Browse the repository at this point in the history