[all-commits] [llvm/llvm-project] ed1273: [libc++] change the visibility of libc++ header to...

RichardLuo via All-commits all-commits at lists.llvm.org
Tue Jun 25 07:58:15 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ed1273d4ddee160f847cbee28714c79353022a3c
      https://github.com/llvm/llvm-project/commit/ed1273d4ddee160f847cbee28714c79353022a3c
  Author: RichardLuo <CommAdama at outlook.com>
  Date:   2024-06-25 (Tue, 25 Jun 2024)

  Changed paths:
    M libcxx/modules/CMakeLists.txt.in

  Log Message:
  -----------
  [libc++] change the visibility of libc++ header to public in libcxx module (#91240)

This PR addresses a problem that headers may not be able to be found if
`#include` is used with std modules.

Consider the following file:

    #include <boost/json.hpp>
    import std;

    int main(int, const char **) { }


Boost will include something from libc++, but we are using -nostdinc++
at [1] so the compiler can not find any default std header. Therefore 
the locally built header needs to be public.

[1]: https://github.com/RichardLuo0/llvm-project/blob/15fdd47c4b110b64dc61f636e42e0484bf8bdbe0/libcxx/modules/CMakeLists.txt.in#L52



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