[all-commits] [llvm/llvm-project] c10c73: [Clang][HIP] Guard declarations of cmath compariso...

Juan Manuel Martinez Caamaño via All-commits all-commits at lists.llvm.org
Mon Jun 1 06:27:00 PDT 2026


  Branch: refs/heads/users/jmmartinez/fix_hip_build_in_windows
  Home:   https://github.com/llvm/llvm-project
  Commit: c10c73df5679df339afd9e2e77f3ec2827df0489
      https://github.com/llvm/llvm-project/commit/c10c73df5679df339afd9e2e77f3ec2827df0489
  Author: Juan Manuel Martinez Caamaño <jmartinezcaamao at gmail.com>
  Date:   2026-06-01 (Mon, 01 Jun 2026)

  Changed paths:
    M clang/lib/Headers/__clang_cuda_math_forward_declares.h
    M clang/lib/Headers/__clang_hip_runtime_wrapper.h
    A clang/test/Headers/hip-constexpr-cmath.hip

  Log Message:
  -----------
  [Clang][HIP] Guard declarations of cmath comparisons when using Microsoft's STL

In HIP, constexpr functions are treated as both, __host__ and
__device__.

A new version of the MS STL shipped with the build tools version 14.51.36231
has constexpr definitions for some cmath functions when the compiler in use is Clang.

These definitions conflict with the __device__ delcarations we provide in
the header wrappers.

This patch guards these declarations/definitions to use the ones coming
from the STL.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list