[all-commits] [llvm/llvm-project] bbc690: Define __STDC_NO_THREADS__ when targeting windows-...

Hans via All-commits all-commits at lists.llvm.org
Thu Dec 16 07:30:28 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bbc690c57213054907284d8964dc0487d38fc57a
      https://github.com/llvm/llvm-project/commit/bbc690c57213054907284d8964dc0487d38fc57a
  Author: Hans Wennborg <hans at chromium.org>
  Date:   2021-12-16 (Thu, 16 Dec 2021)

  Changed paths:
    M clang/lib/Basic/Targets/OSTargets.cpp
    M clang/test/Preprocessor/init.c

  Log Message:
  -----------
  Define __STDC_NO_THREADS__ when targeting windows-msvc (PR48704)

MSVC's libc doesn't provide thread.h, so we should set the macro to
indicate that.

We could just set it in C mode, but I noticed that Darwin sets it
unconditionally, so perhaps we should do the same here.

Differential revision: https://reviews.llvm.org/D112081




More information about the All-commits mailing list