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

Juan Manuel Martinez Caamaño via All-commits all-commits at lists.llvm.org
Mon Jun 1 07:23:38 PDT 2026


  Branch: refs/heads/users/jmmartinez/fix_hip_build_in_windows
  Home:   https://github.com/llvm/llvm-project
  Commit: 86548feba1b126de38d313490a5440f1111d0084
      https://github.com/llvm/llvm-project/commit/86548feba1b126de38d313490a5440f1111d0084
  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_cmath.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