[clang] [llvm] [cmake] Remove custom linker flag check function (PR #86602)

2024-04-21 Thread Petr Hosek via cfe-commits

petrhosek wrote:

I'd actually prefer this not be merged as is. I have already made a similar 
change locally but during testing I discovered a major issue with 
`check_linker_flag`: unlike other CMake `check_*` functions, and even 
`llvm_check_linker_flag`, `check_linker_flag` doesn't apply 
`CMAKE_REQUIRED_LINK_OPTIONS` because [the implementation overrides 
it](https://gitlab.kitware.com/cmake/cmake/-/blob/14de6802e40edcdeebc73d81210fe8e1ec0f469e/Modules/Internal/CheckLinkerFlag.cmake#L25)
 and this can result in failed checks when `CMAKE_REQUIRED_LINK_OPTIONS` 
contains necessary flags (it actually breaks the runtimes build which this 
change doesn't touch). I'd rather prefer to continue using 
`llvm_check_linker_flag` with our own implementation [similar to the CMake 
one](https://gitlab.kitware.com/cmake/cmake/-/blob/14de6802e40edcdeebc73d81210fe8e1ec0f469e/Modules/Internal/CheckLinkerFlag.cmake)
 that appends `CMAKE_REQUIRED_LINK_OPTIONS` rather than overwriting it. If you 
want to implement such a change, that would be great, otherwise I can take a 
stab at it when I have some time.

https://github.com/llvm/llvm-project/pull/86602
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-04-19 Thread Petr Hosek via cfe-commits

petrhosek wrote:

This is a re-upload of https://reviews.llvm.org/D140925, I plan to land this 
change if there are no objections.

https://github.com/llvm/llvm-project/pull/89425
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [compiler-rt] [llvm] [CMake] Use Clang to infer the target triple (PR #89425)

2024-04-19 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek created 
https://github.com/llvm/llvm-project/pull/89425

When using Clang as a compiler, use Clang to normalize the triple that's used 
to construct path for runtime library build and install paths. This ensures 
that paths are consistent and avoids the issue where the build uses a different 
triple spelling.

Differential Revision: https://reviews.llvm.org/D140925

>From eb2459876526b78c97b04801dd07bd53540b2892 Mon Sep 17 00:00:00 2001
From: Petr Hosek 
Date: Tue, 15 Feb 2022 22:59:58 -0800
Subject: [PATCH] [CMake] Use Clang to infer the target triple

When using Clang as a compiler, use Clang to normalize the triple that's
used to construct path for runtime library build and install paths. This
ensures that paths are consistent and avoids the issue where the build
uses a different triple spelling.

Differential Revision: https://reviews.llvm.org/D140925
---
 clang/cmake/caches/Fuchsia-stage2.cmake |  2 +-
 compiler-rt/lib/builtins/CMakeLists.txt | 13 +
 runtimes/CMakeLists.txt | 14 ++
 3 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake 
b/clang/cmake/caches/Fuchsia-stage2.cmake
index d5546e20873b3c..029c069997396d 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -142,7 +142,7 @@ if(WIN32 OR LLVM_WINSYSROOT)
   set(RUNTIMES_${target}_CMAKE_MODULE_LINKER_FLAGS ${WINDOWS_LINK_FLAGS} CACHE 
STRING "")
 endif()
 
-foreach(target 
aarch64-unknown-linux-gnu;armv7-unknown-linux-gnueabihf;i386-unknown-linux-gnu;riscv64-unknown-linux-gnu;x86_64-unknown-linux-gnu)
+foreach(target 
aarch64-linux-gnu;armv7-linux-gnueabihf;i386-linux-gnu;riscv64-linux-gnu;x86_64-linux-gnu)
   if(LINUX_${target}_SYSROOT)
 # Set the per-target builtins options.
 list(APPEND BUILTIN_TARGETS "${target}")
diff --git a/compiler-rt/lib/builtins/CMakeLists.txt 
b/compiler-rt/lib/builtins/CMakeLists.txt
index f9611574a562b4..4c6de992204c16 100644
--- a/compiler-rt/lib/builtins/CMakeLists.txt
+++ b/compiler-rt/lib/builtins/CMakeLists.txt
@@ -28,6 +28,19 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
   if (NOT LLVM_RUNTIMES_BUILD)
 load_llvm_config()
   endif()
+  if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+set(print_target_triple ${CMAKE_CXX_COMPILER} 
--target=${LLVM_RUNTIME_TRIPLE} -print-target-triple)
+execute_process(COMMAND ${print_target_triple}
+  RESULT_VARIABLE result
+  OUTPUT_VARIABLE output
+  OUTPUT_STRIP_TRAILING_WHITESPACE)
+if(result EQUAL 0)
+  set(LLVM_RUNTIME_TRIPLE ${output})
+else()
+  string(REPLACE ";" " " print_target_triple "${print_target_triple}")
+  message(WARNING "Failed to execute `${print_target_triple}` to normalize 
target triple.")
+endif()
+  endif()
   construct_compiler_rt_default_triple()
 
   include(SetPlatformToolchainTools)
diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt
index 6f24fbcccec955..bb1f544706f2bf 100644
--- a/runtimes/CMakeLists.txt
+++ b/runtimes/CMakeLists.txt
@@ -181,6 +181,20 @@ message(STATUS "LLVM default target triple: 
${LLVM_DEFAULT_TARGET_TRIPLE}")
 
 set(LLVM_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
 
+if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
+  set(print_target_triple ${CMAKE_CXX_COMPILER} 
--target=${LLVM_RUNTIME_TRIPLE} -print-target-triple)
+  execute_process(COMMAND ${print_target_triple}
+RESULT_VARIABLE result
+OUTPUT_VARIABLE output
+OUTPUT_STRIP_TRAILING_WHITESPACE)
+  if(result EQUAL 0)
+set(LLVM_RUNTIME_TRIPLE ${output})
+  else()
+string(REPLACE ";" " " print_target_triple "${print_target_triple}")
+message(WARNING "Failed to execute `${print_target_triple}` to normalize 
target triple.")
+  endif()
+endif()
+
 option(LLVM_INCLUDE_TESTS "Generate build targets for the runtimes unit 
tests." ON)
 option(LLVM_INCLUDE_DOCS "Generate build targets for the runtimes 
documentation." ON)
 option(LLVM_ENABLE_SPHINX "Use Sphinx to generate the runtimes documentation." 
OFF)

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] NFC: Make clang resource headers an interface library (PR #88317)

2024-04-11 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/88317
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang-tools-extra] [libcxx] [clang] Enable sized deallocation by default in C++14 onwards (PR #83774)

2024-03-26 Thread Petr Hosek via cfe-commits


@@ -49,3 +49,62 @@ if ((MINGW OR CYGWIN) AND BUILD_SHARED_LIBS)
   # despite potential dllexports.
   target_link_options(clangInterpreter PRIVATE LINKER:--export-all-symbols)
 endif()
+
+if(MSVC)
+  set_target_properties(clangInterpreter PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS 
1)
+
+  # RTTI/C++ symbols
+  set(clangInterpreter_exports ${clangInterpreter_exports} ??_7type_info@@6B@
+?__type_info_root_node@@3U__type_info_node@@A
+?nothrow@std@@3Unothrow_t@1@B
+  )
+
+  # Compiler added symbols for static variables. NOT for VStudio < 2015
+  set(clangInterpreter_exports ${clangInterpreter_exports} _Init_thread_abort 
_Init_thread_epoch
+_Init_thread_footer _Init_thread_header _tls_index
+  )
+
+  if(CMAKE_SIZEOF_VOID_P EQUAL 8)
+# new/delete variants needed when linking to static msvc runtime (esp. 
Debug)
+set(clangInterpreter_exports ${clangInterpreter_exports}
+  ??2@YAPEAX_K@Z
+  ??3@YAXPEAX@Z
+  ??_U@YAPEAX_K@Z
+  ??_V@YAXPEAX@Z
+  ??3@YAXPEAX_K@Z
+  ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@H@Z
+  ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@M@Z
+  ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@N@Z
+  ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@PEBX@Z
+  
??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QEAAAEAV01@P6AAEAV01@AEAV01@@Z@Z
+  
??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@D@Z
+  
??$?6U?$char_traits@D@std@@@std@@YAAEAV?$basic_ostream@DU?$char_traits@D@std@@@0@AEAV10@PEBD@Z
+  ?_Facet_Register@std@@YAXPEAV_Facet_base@1@@Z
+)
+  else()
+set(clangInterpreter_exports ${clangInterpreter_exports}
+  ??2@YAPAXI@Z
+  ??3@YAXPAX@Z
+  ??3@YAXPAXI@Z
+  ??_U@YAPAXI@Z
+  ??_V@YAXPAX@Z
+  ??_V@YAXPAXI@Z
+  ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@H@Z
+  ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@M@Z
+  ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@N@Z
+  ??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@PBX@Z
+  
??6?$basic_ostream@DU?$char_traits@D@std@@@std@@QAEAAV01@P6AAAV01@AAV01@@Z@Z
+  
??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@D@Z
+  
??$?6U?$char_traits@D@std@@@std@@YAAAV?$basic_ostream@DU?$char_traits@D@std@@@0@AAV10@PBD@Z
+  ?_Facet_Register@std@@YAXPAV_Facet_base@1@@Z
+)
+  endif()
+
+  # List to '/EXPORT:sym0 /EXPORT:sym1 /EXPORT:sym2 ...'
+  foreach(sym ${clangInterpreter_exports})
+set(clangInterpreter_link_str "${clangInterpreter_link_str} 
/EXPORT:${sym}")
+  endforeach(sym ${clangInterpreter_exports})
+
+  set_property(TARGET clangInterpreter APPEND_STRING PROPERTY LINK_FLAGS 
${clangInterpreter_link_str})
+
+endif(MSVC)

petrhosek wrote:

Can you clarify what you mean by "`target_link_options` doesn't work", I'm not 
sure which part you're referring to?

https://github.com/llvm/llvm-project/pull/83774
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [CMake] Change GCC_INSTALL_PREFIX from warning to fatal error (PR #85891)

2024-03-25 Thread Petr Hosek via cfe-commits

petrhosek wrote:

> @petrhosek Is there a way to pass flags only to the runtimes portion of the 
> build within the normal workflow? I know we have 
> `-DRUNTIMES_x86_64-unknown-linux-gnu_CMAKE_CXX_COMPILE_FLAGS=` that might 
> work, but I don't think this is respected if we're using the `default` target.

You can use `RUNTIMES_CMAKE_ARGS`, see for example: 
https://github.com/llvm/llvm-project/blob/c6a65e4b0c80245d766ae2f2f7305b5371d096f5/clang/cmake/caches/Fuchsia-stage2.cmake#L90

https://github.com/llvm/llvm-project/pull/85891
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [CMake] Change GCC_INSTALL_PREFIX from warning to fatal error (PR #85891)

2024-03-20 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/85891
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [CMAKE] Enable FatLTO as a build option for LLVM (PR #80480)

2024-03-15 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/80480
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [CMAKE] Enable FatLTO as a build option for LLVM (PR #80480)

2024-03-15 Thread Petr Hosek via cfe-commits


@@ -1621,8 +1621,15 @@ function(add_unittest test_suite test_name)
   # The runtime benefits of LTO don't outweight the compile time costs for 
tests.
   if(LLVM_ENABLE_LTO)
 if((UNIX OR MINGW) AND LINKER_IS_LLD)
-  set_property(TARGET ${test_name} APPEND_STRING PROPERTY
-LINK_FLAGS " -Wl,--lto-O0")
+  if(LLVM_ENABLE_FATLTO)
+# When using FatLTO, just use relocatable linking.
+set_property(TARGET ${test_name} APPEND_STRING PROPERTY
+  LINK_FLAGS " -Wl,--no-fat-lto-objects")
+set_property(TARGET ${test_name} APPEND_STRING PROPERTY COMPILE_FLAGS 
" -fno-lto")

petrhosek wrote:

I'd omit it since it shouldn't be necessary.

https://github.com/llvm/llvm-project/pull/80480
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][Sema] Fix a bug on type constraint checking (PR #84671)

2024-03-12 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek updated 
https://github.com/llvm/llvm-project/pull/84671

>From 1b71ce0ece77060591edaf69794e184d58ad9b15 Mon Sep 17 00:00:00 2001
From: huqizhi 
Date: Sun, 10 Mar 2024 16:11:18 +0800
Subject: [PATCH] [Clang][Sema] Fix a bug on type constraint checking

---
 clang/docs/ReleaseNotes.rst|  2 ++
 clang/lib/Sema/SemaTemplateInstantiateDecl.cpp |  1 +
 clang/test/Sema/PR84368.cpp| 16 
 3 files changed, 19 insertions(+)
 create mode 100644 clang/test/Sema/PR84368.cpp

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 88e552d5c46113..12b867330efff1 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -351,6 +351,8 @@ Bug Fixes to C++ Support
   when one of the function had more specialized templates.
   Fixes (`#82509 `_)
   and (`#74494 `_)
+- Fix an issue where missing set friend declaration in template class 
instantiation.
+  Fixes (#GH84368).
 
 Bug Fixes to AST Handling
 ^
diff --git a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp 
b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
index 20c2c93ac9c7b4..765c5bc689ae1e 100644
--- a/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
+++ b/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
@@ -1698,6 +1698,7 @@ Decl 
*TemplateDeclInstantiator::VisitClassTemplateDecl(ClassTemplateDecl *D) {
 assert(!Owner->isDependentContext());
 Inst->setLexicalDeclContext(Owner);
 RecordInst->setLexicalDeclContext(Owner);
+Inst->setObjectOfFriendDecl();
 
 if (PrevClassTemplate) {
   Inst->setCommonPtr(PrevClassTemplate->getCommonPtr());
diff --git a/clang/test/Sema/PR84368.cpp b/clang/test/Sema/PR84368.cpp
new file mode 100644
index 00..073530ffd8abea
--- /dev/null
+++ b/clang/test/Sema/PR84368.cpp
@@ -0,0 +1,16 @@
+// RUN: %clang_cc1 -std=c++20 -verify %s
+// RUN: %clang_cc1 -std=c++23 -verify %s
+// expected-no-diagnostics
+
+template concept IsOk = requires() { typename T::Float; };
+
+template struct Thing;
+
+template struct Foobar {
+   template struct Inner {
+   template friend struct Thing;
+   };
+};
+
+struct MyType { using Float=float; };
+Foobar::Inner<0> foobar;

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Driver,BareMetal] Replace -lclang_rt.builtins{,-$arch}.a with an absolute path (PR #82424)

2024-03-07 Thread Petr Hosek via cfe-commits

petrhosek wrote:

I agree with @MaskRay that prior to this change the BareMetal driver was using 
a logic that was inconsistent with all other drivers and not something we 
intend to support. The correct solution is to extend the BareMetal driver to 
support `multilib.yaml` for Clang runtime libraries; this includes not only 
compiler-rt builtins but also LLVM libc and libc++.

https://github.com/llvm/llvm-project/pull/82424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Fuchsia] Include baremetal ARM builtins and libc (PR #83949)

2024-03-05 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek closed 
https://github.com/llvm/llvm-project/pull/83949
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Fuchsia] Include baremetal ARM builtins and libc (PR #83949)

2024-03-05 Thread Petr Hosek via cfe-commits


@@ -300,10 +300,43 @@ if(FUCHSIA_SDK)
   set(LLVM_RUNTIME_MULTILIB_hwasan+noexcept_TARGETS 
"aarch64-unknown-fuchsia;riscv64-unknown-fuchsia" CACHE STRING "")
 endif()
 
+foreach(target armv6m-unknown-eabi)
+  list(APPEND BUILTIN_TARGETS "${target}")
+  set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_SYSROOT "" CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+  foreach(lang C;CXX;ASM)
+set(BUILTINS_${target}_CMAKE_${lang}_FLAGS "--target=${target} 
-mcpu=cortex-m0plus -mthumb" CACHE STRING "")
+  endforeach()
+  foreach(type SHARED;MODULE;EXE)
+set(BUILTINS_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE 
STRING "")
+  endforeach()
+  set(BUILTINS_${target}_COMPILER_RT_BAREMETAL_BUILD ON CACHE BOOL "")
+
+  list(APPEND RUNTIME_TARGETS "${target}")
+  set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_SYSROOT "" CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY CACHE 
STRING "")
+  foreach(lang C;CXX;ASM)
+set(RUNTIMES_${target}_CMAKE_${lang}_FLAGS "--target=${target} 
-mcpu=cortex-m0plus -mthumb" CACHE STRING "")
+  endforeach()
+  foreach(type SHARED;MODULE;EXE)
+set(RUNTIMES_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE 
STRING "")
+  endforeach()
+  set(RUNTIMES_${target}_LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
+  set(RUNTIMES_${target}_LIBC_ENABLE_USE_BY_CLANG ON CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "libc" CACHE STRING "")
+endforeach()
+
 foreach(target riscv32-unknown-elf)
   list(APPEND BUILTIN_TARGETS "${target}")
   set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
-  set(BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR RISCV CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR riscv CACHE STRING "")

petrhosek wrote:

Removed

https://github.com/llvm/llvm-project/pull/83949
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Fuchsia] Include baremetal ARM builtins and libc (PR #83949)

2024-03-05 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek updated 
https://github.com/llvm/llvm-project/pull/83949

>From 8c5829c6eb9607152b85dd0e99ccb39770d536fd Mon Sep 17 00:00:00 2001
From: Petr Hosek 
Date: Mon, 6 Mar 2023 19:31:13 +
Subject: [PATCH] [Fuchsia] Include baremetal ARM builtins and libc

For now we only include the armv6m-unknown-eabi target but we plan to
include more targets in the future (including multilibs).
---
 clang/cmake/caches/Fuchsia-stage2.cmake | 33 +
 1 file changed, 33 insertions(+)

diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake 
b/clang/cmake/caches/Fuchsia-stage2.cmake
index eee37c5e7901fa..db7430b3344c3e 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -300,6 +300,39 @@ if(FUCHSIA_SDK)
   set(LLVM_RUNTIME_MULTILIB_hwasan+noexcept_TARGETS 
"aarch64-unknown-fuchsia;riscv64-unknown-fuchsia" CACHE STRING "")
 endif()
 
+foreach(target armv6m-unknown-eabi)
+  list(APPEND BUILTIN_TARGETS "${target}")
+  set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_SYSROOT "" CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+  foreach(lang C;CXX;ASM)
+set(BUILTINS_${target}_CMAKE_${lang}_FLAGS "--target=${target} 
-mcpu=cortex-m0plus -mthumb" CACHE STRING "")
+  endforeach()
+  foreach(type SHARED;MODULE;EXE)
+set(BUILTINS_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE 
STRING "")
+  endforeach()
+  set(BUILTINS_${target}_COMPILER_RT_BAREMETAL_BUILD ON CACHE BOOL "")
+
+  list(APPEND RUNTIME_TARGETS "${target}")
+  set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_SYSROOT "" CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY CACHE 
STRING "")
+  foreach(lang C;CXX;ASM)
+set(RUNTIMES_${target}_CMAKE_${lang}_FLAGS "--target=${target} 
-mcpu=cortex-m0plus -mthumb" CACHE STRING "")
+  endforeach()
+  foreach(type SHARED;MODULE;EXE)
+set(RUNTIMES_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE 
STRING "")
+  endforeach()
+  set(RUNTIMES_${target}_LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
+  set(RUNTIMES_${target}_LIBC_ENABLE_USE_BY_CLANG ON CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "libc" CACHE STRING "")
+endforeach()
+
 foreach(target riscv32-unknown-elf)
   list(APPEND BUILTIN_TARGETS "${target}")
   set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [CMAKE] Enable FatLTO as a build option for LLVM (PR #80480)

2024-03-04 Thread Petr Hosek via cfe-commits


@@ -1621,8 +1621,15 @@ function(add_unittest test_suite test_name)
   # The runtime benefits of LTO don't outweight the compile time costs for 
tests.
   if(LLVM_ENABLE_LTO)
 if((UNIX OR MINGW) AND LINKER_IS_LLD)
-  set_property(TARGET ${test_name} APPEND_STRING PROPERTY
-LINK_FLAGS " -Wl,--lto-O0")
+  if(LLVM_ENABLE_FATLTO)
+# When using FatLTO, just use relocatable linking.
+set_property(TARGET ${test_name} APPEND_STRING PROPERTY
+  LINK_FLAGS " -Wl,--no-fat-lto-objects")
+set_property(TARGET ${test_name} APPEND_STRING PROPERTY COMPILE_FLAGS 
" -fno-lto")

petrhosek wrote:

What's the motivation for including `-fno-lto` in compile flags here?

https://github.com/llvm/llvm-project/pull/80480
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [CMAKE] Enable FatLTO as a build option for LLVM (PR #80480)

2024-03-04 Thread Petr Hosek via cfe-commits


@@ -1251,6 +1253,10 @@ elseif(LLVM_ENABLE_LTO)
   endif()
 endif()
 
+if(LLVM_ENABLE_FATLTO AND (FUCHSIA OR UNIX))
+append("-ffat-lto-objects" CMAKE_EXE_LINKER_FLAGS 
CMAKE_SHARED_LINKER_FLAGS)

petrhosek wrote:

I'd also include the flag in `CMAKE_MODULE_LINKER_FLAGS` for completeness.

https://github.com/llvm/llvm-project/pull/80480
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Fuchsia] Include baremetal ARM builtins and libc (PR #83949)

2024-03-04 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek created 
https://github.com/llvm/llvm-project/pull/83949

For now we only include the armv6m-unknown-eabi target but we plan to include 
more targets in the future (including multilibs).

>From 7924ab437a5df81aa5d5481541ad4979335f5a9b Mon Sep 17 00:00:00 2001
From: Petr Hosek 
Date: Mon, 6 Mar 2023 19:31:13 +
Subject: [PATCH] [Fuchsia] Include baremetal ARM builtins and libc

For now we only include the armv6m-unknown-eabi target but we plan to
include more targets in the future (including multilibs).
---
 clang/cmake/caches/Fuchsia-stage2.cmake | 37 +++--
 1 file changed, 35 insertions(+), 2 deletions(-)

diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake 
b/clang/cmake/caches/Fuchsia-stage2.cmake
index eee37c5e7901fa..97c93969e18e80 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -300,10 +300,43 @@ if(FUCHSIA_SDK)
   set(LLVM_RUNTIME_MULTILIB_hwasan+noexcept_TARGETS 
"aarch64-unknown-fuchsia;riscv64-unknown-fuchsia" CACHE STRING "")
 endif()
 
+foreach(target armv6m-unknown-eabi)
+  list(APPEND BUILTIN_TARGETS "${target}")
+  set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_SYSROOT "" CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+  foreach(lang C;CXX;ASM)
+set(BUILTINS_${target}_CMAKE_${lang}_FLAGS "--target=${target} 
-mcpu=cortex-m0plus -mthumb" CACHE STRING "")
+  endforeach()
+  foreach(type SHARED;MODULE;EXE)
+set(BUILTINS_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE 
STRING "")
+  endforeach()
+  set(BUILTINS_${target}_COMPILER_RT_BAREMETAL_BUILD ON CACHE BOOL "")
+
+  list(APPEND RUNTIME_TARGETS "${target}")
+  set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_SYSTEM_PROCESSOR arm CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_SYSROOT "" CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY CACHE 
STRING "")
+  foreach(lang C;CXX;ASM)
+set(RUNTIMES_${target}_CMAKE_${lang}_FLAGS "--target=${target} 
-mcpu=cortex-m0plus -mthumb" CACHE STRING "")
+  endforeach()
+  foreach(type SHARED;MODULE;EXE)
+set(RUNTIMES_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE 
STRING "")
+  endforeach()
+  set(RUNTIMES_${target}_LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
+  set(RUNTIMES_${target}_LIBC_ENABLE_USE_BY_CLANG ON CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "libc" CACHE STRING "")
+endforeach()
+
 foreach(target riscv32-unknown-elf)
   list(APPEND BUILTIN_TARGETS "${target}")
   set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
-  set(BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR RISCV CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR riscv CACHE STRING "")
   set(BUILTINS_${target}_CMAKE_SYSROOT "" CACHE STRING "")
   set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
   foreach(lang C;CXX;ASM)
@@ -316,7 +349,7 @@ foreach(target riscv32-unknown-elf)
 
   list(APPEND RUNTIME_TARGETS "${target}")
   set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
-  set(RUNTIMES_${target}_CMAKE_SYSTEM_PROCESSOR RISCV CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_SYSTEM_PROCESSOR riscv CACHE STRING "")
   set(RUNTIMES_${target}_CMAKE_SYSROOT "" CACHE STRING "")
   set(RUNTIMES_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
   set(RUNTIMES_${target}_CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY CACHE 
STRING "")

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2024-02-27 Thread Petr Hosek via cfe-commits


@@ -1282,8 +1283,14 @@ class SegmentBuilder {
   // value for that area.
   // We add counts of the regions of the same kind as the active region
   // to handle the both situations.
-  if (I->Kind == Active->Kind)
-Active->ExecutionCount += I->ExecutionCount;
+  if (I->Kind == Active->Kind) {
+assert(I->HasSingleByteCoverage == Active->HasSingleByteCoverage &&
+   "Regions are generated in different coverage modes");

petrhosek wrote:

This is just a minor nit that I just noticed and could be addressed in some 
follow up change, but in all other `assert` cases the message is not 
capitalized so shouldn't capitalize here either for consistency.

https://github.com/llvm/llvm-project/pull/75425
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang] Update -Wformat warnings for fixed-point format specifiers (PR #82855)

2024-02-24 Thread Petr Hosek via cfe-commits


@@ -2981,6 +2981,10 @@ class ASTContext : public RefCountedBase {
   // corresponding saturated type for a given fixed point type.
   QualType getCorrespondingSaturatedType(QualType Ty) const;
 
+  // Per ISO N1169, this method accepts fixed point types and returns the
+  // corresponding non-saturated type for a given fixed point type.

petrhosek wrote:

```suggestion
  // Per ISO/IEC TR 18037:2008, this method accepts fixed point types and
  // returns the corresponding non-saturated type for a given fixed point type.
```

https://github.com/llvm/llvm-project/pull/82855
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang] Update -Wformat warnings for fixed-point format specifiers (PR #82855)

2024-02-24 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek deleted 
https://github.com/llvm/llvm-project/pull/82855
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang] Update -Wformat warnings for fixed-point format specifiers (PR #82855)

2024-02-24 Thread Petr Hosek via cfe-commits


@@ -2981,6 +2981,10 @@ class ASTContext : public RefCountedBase {
   // corresponding saturated type for a given fixed point type.
   QualType getCorrespondingSaturatedType(QualType Ty) const;
 
+  // Per ISO N1169, this method accepts fixed point types and returns the

petrhosek wrote:

```suggestion
  // Per ISO/IEC TR 18037:2008, this method accepts fixed point types and 
returns the
```

https://github.com/llvm/llvm-project/pull/82855
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang] Update -Wformat warnings for fixed-point format specifiers (PR #82855)

2024-02-24 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/82855
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang] Update -Wformat warnings for fixed-point format specifiers (PR #82855)

2024-02-24 Thread Petr Hosek via cfe-commits

petrhosek wrote:

> Do you know a libc implementation that actually implements `%k` `%r` and who 
> are the potential users? From a quick glance, gcc avr supports fixed-point 
> types but avr-libc doesn't seem to support %k %r.

LLVM-libc will support them soon, PR should be coming next week. We have 
internal customers at Google that are starting to use fixed-point types in 
their embedded products.

https://github.com/llvm/llvm-project/pull/82855
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Driver,BareMetal] Replace -lclang_rt.builtins{,-$arch}.a with an absolute path (PR #82424)

2024-02-20 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/82424
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][driver] Allow unaligned access on ARMv7 and higher by default (PR #82400)

2024-02-20 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/82400
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [RISCV] Disable generation of asynchronous unwind tables for RISCV baremetal (PR #81727)

2024-02-19 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/81727
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [CMake][PGO] Build Sema.cpp to generate profdata for PGO builds (PR #77347)

2024-02-13 Thread Petr Hosek via cfe-commits


@@ -26,9 +30,23 @@ if(LLVM_BUILD_INSTRUMENTED)
 message(STATUS "To enable merging PGO data LLVM_PROFDATA has to point to 
llvm-profdata")
   else()
 add_custom_target(generate-profdata
-  COMMAND "${Python3_EXECUTABLE}" 
${CMAKE_CURRENT_SOURCE_DIR}/perf-helper.py merge ${LLVM_PROFDATA} 
${CMAKE_CURRENT_BINARY_DIR}/clang.profdata ${CMAKE_CURRENT_BINARY_DIR}
+  COMMAND "${Python3_EXECUTABLE}" 
${CMAKE_CURRENT_SOURCE_DIR}/perf-helper.py merge ${LLVM_PROFDATA} 
${CMAKE_CURRENT_BINARY_DIR}/clang.profdata ${CMAKE_CURRENT_BINARY_DIR} 
${CMAKE_BINARY_DIR}/profiles/
   COMMENT "Merging profdata"
   DEPENDS generate-profraw)
+if (CLANG_PGO_TRAINING_DATA_SOURCE_DIR)
+  llvm_ExternalProject_Add(generate-profraw-external 
${CLANG_PGO_TRAINING_DATA_SOURCE_DIR}
+  USE_TOOLCHAIN EXLUDE_FROM_ALL NO_INSTALL DEPENDS 
generate-profraw)
+  add_dependencies(generate-profdata generate-profraw-external)
+else()
+  # Default to compiling a file from clang. This also builds all the
+  # dependencies needed to build this file, like TableGen.
+  set(generate_profraw_clang_sema 
tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/Sema.cpp.o)
+  llvm_ExternalProject_Add(generate-profraw-clang 
${CMAKE_CURRENT_SOURCE_DIR}/../../../llvm
+  USE_TOOLCHAIN EXLUDE_FROM_ALL NO_INSTALL DEPENDS generate-profraw
+  EXTRA_TARGETS generate_profraw_clang_sema

petrhosek wrote:

@tstellar For the numbers you reported (~34% and ~20%), what did you use to 
collect those numbers?

https://github.com/llvm/llvm-project/pull/77347
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [clang] Add fixed point precision macros (PR #81207)

2024-02-13 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/81207
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Diagnose invalid fixed point conversion (PR #80763)

2024-02-05 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/80763
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[llvm] [lldb] [lld] [libc] [clang] [libcxx] [flang] [CMAKE] Enable FatLTO as a build option for LLVM (PR #80480)

2024-02-02 Thread Petr Hosek via cfe-commits


@@ -1251,6 +1253,10 @@ elseif(LLVM_ENABLE_LTO)
   endif()
 endif()
 
+if(LLVM_ENABLE_FATLTO AND (FUCHSIA OR UNIX))
+append("-ffat-lto-objects" CMAKE_EXE_LINKER_FLAGS 
CMAKE_SHARED_LINKER_FLAGS)

petrhosek wrote:

I think you also need to append this flag to `CMAKE_C_FLAGS` and 
`CMAKE_CXX_FLAGS` just like we do for `-flto` above.

https://github.com/llvm/llvm-project/pull/80480
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libc] [llvm] [clang-tools-extra] [flang] [libunwind] [lld] [lldb] [mlir] [libcxx] [compiler-rt] [clang] Reland: [libc++][format] P2637R3: Member visit (std::basic_format_arg) #76449 (PR #79032)

2024-01-26 Thread Petr Hosek via cfe-commits

petrhosek wrote:

I tried this branch on our Windows builders although I'm not sure if it's 
related or not to this patch:
```
# COMPILED WITH
C:/b/s/w/ir/x/w/llvm_build/./bin/clang-cl.exe 
C:\b\s\w\ir\x\w\github-H-G-Hristov-llvm-project\libcxx\test\libcxx\fuzzing\random.pass.cpp
 --driver-mode=g++ --target=x86_64-pc-windows-msvc -fms-runtime-lib=static 
-nostdinc++ -I C:/b/s/w/ir/x/w/llvm_build/include/c++/v1 -I 
C:/b/s/w/ir/x/w/llvm_build/include/x86_64-pc-windows-msvc/c++/v1 -I 
C:/b/s/w/ir/x/w/github-H-G-Hristov-llvm-project/libcxx/test/support 
-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS 
-D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX -std=c++26 -Werror -Wall 
-Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template 
-Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move 
-Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier 
-Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals 
-Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter 
-Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args 
-Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed 
-Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move 
-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL 
-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety 
-Wuser-defined-warnings  -llibc++experimental -nostdlib -L 
C:/b/s/w/ir/x/w/llvm_build/./lib/x86_64-pc-windows-msvc -llibc++ -llibcpmt -o 
C:\b\s\w\ir\x\w\llvm_build\runtimes\runtimes-x86_64-pc-windows-msvc-bins\test\libcxx\fuzzing\Output\random.pass.cpp.dir\t.tmp.exe
# executed command: C:/b/s/w/ir/x/w/llvm_build/./bin/clang-cl.exe 
'C:\b\s\w\ir\x\w\github-H-G-Hristov-llvm-project\libcxx\test\libcxx\fuzzing\random.pass.cpp'
 --driver-mode=g++ --target=x86_64-pc-windows-msvc -fms-runtime-lib=static 
-nostdinc++ -I C:/b/s/w/ir/x/w/llvm_build/include/c++/v1 -I 
C:/b/s/w/ir/x/w/llvm_build/include/x86_64-pc-windows-msvc/c++/v1 -I 
C:/b/s/w/ir/x/w/github-H-G-Hristov-llvm-project/libcxx/test/support 
-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS 
-D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX -std=c++26 -Werror -Wall 
-Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template 
-Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move 
-Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier 
-Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals 
-Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter 
-Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args 
-Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed 
-Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move 
-D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL 
-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety 
-Wuser-defined-warnings -llibc++experimental -nostdlib -L 
C:/b/s/w/ir/x/w/llvm_build/./lib/x86_64-pc-windows-msvc -llibc++ -llibcpmt -o 
'C:\b\s\w\ir\x\w\llvm_build\runtimes\runtimes-x86_64-pc-windows-msvc-bins\test\libcxx\fuzzing\Output\random.pass.cpp.dir\t.tmp.exe'
# .---command stderr
# | In file included from 
C:\b\s\w\ir\x\w\github-H-G-Hristov-llvm-project\libcxx\test\libcxx\fuzzing\random.pass.cpp:16:
# | In file included from C:/b/s/w/ir/x/w/llvm_build/include/c++/v1\cmath:319:
# | In file included from C:/b/s/w/ir/x/w/llvm_build/include/c++/v1\math.h:301:
# | In file included from C:\b\s\w\ir\cache\windows_sdk\Windows 
Kits\10\Include\10.0.19041.0\ucrt\math.h:11:
# | C:\b\s\w\ir\cache\windows_sdk\Windows 
Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h:413:16: error: call to 
'fpclassify' is ambiguous
# |   413 | return fpclassify(_X) == FP_NAN;
# |   |^~
# | 
C:\b\s\w\ir\x\w\github-H-G-Hristov-llvm-project\libcxx\test\libcxx\fuzzing\random.pass.cpp:166:12:
 note: in instantiation of function template specialization 'isnan' 
requested here
# |   166 |   if (std::isnan(res)) {
# |   |^
# | 
C:\b\s\w\ir\x\w\github-H-G-Hristov-llvm-project\libcxx\test\libcxx\fuzzing\random.pass.cpp:178:10:
 note: in instantiation of function template specialization 
'helper>' requested here
# |   178 |   return helper>(data, 
size)   ||
# |   |  ^
# | C:\b\s\w\ir\cache\windows_sdk\Windows 
Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h:288:31: note: candidate 
function
# |   288 | _Check_return_ inline int fpclassify(_In_ float _X) throw()
# |   |   ^
# | C:\b\s\w\ir\cache\windows_sdk\Windows 
Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h:293:31: note: candidate 
function
# |   293 | _Check_return_ inline int fpclassify(_In_ double _X) throw()
# |   |   ^
# | C:\b\s\w\ir\cache\windows_sdk\Windows 
Kits\10\Include\10.0.19041.0\ucrt\corecrt_math.h:298:31: note: candidate 
function
# |   298 | 

[clang] [llvm] [CMake][PGO] Add option for using an external project to generate profile data (PR #78879)

2024-01-23 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/78879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[llvm] [clang] [CMake][PGO] Add option for using an external project to generate profile data (PR #78879)

2024-01-23 Thread Petr Hosek via cfe-commits


@@ -15,7 +19,7 @@ if(LLVM_BUILD_INSTRUMENTED)
 )

petrhosek wrote:

Looks like I added that in https://reviews.llvm.org/D138974 but I'm not aware 
of it being used anywhere at the moment. I'd still prefer renaming it to 
`CLANG_PGO_TRAINING_DEPS` for consistency, especially that we're now adding it 
to cache.

https://github.com/llvm/llvm-project/pull/78879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [CMake][PGO] Add option for using an external project to generate profile data (PR #78879)

2024-01-23 Thread Petr Hosek via cfe-commits


@@ -30,26 +30,28 @@ def findFilesWithExtension(path, extension):
 
 
 def clean(args):
-if len(args) != 2:
+if len(args) < 2:
 print(
-"Usage: %s clean  \n" % __file__
+"Usage: %s clean  \n" % __file__
 + "\tRemoves all files with extension from ."
 )
 return 1
-for filename in findFilesWithExtension(args[0], args[1]):
-os.remove(filename)
+for path in args[1:-1]:
+for filename in findFilesWithExtension(path, args[-1]):
+os.remove(filename)
 return 0
 
 
 def merge(args):
-if len(args) != 3:
+if len(args) < 3:
 print(
-"Usage: %s merge   \n" % __file__
+"Usage: %s merge   \n" % __file__
 + "\tMerges all profraw files from path into output."
 )
 return 1
 cmd = [args[0], "merge", "-o", args[1]]
-cmd.extend(findFilesWithExtension(args[2], "profraw"))
+for i in range(2, len(args)):
+cmd.extend(findFilesWithExtension(args[i], "profraw"))

petrhosek wrote:

```suggestion
for path in args[2:]:
cmd.extend(findFilesWithExtension(path, "profraw"))
```

https://github.com/llvm/llvm-project/pull/78879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [CMake][PGO] Add option for using an external project to generate profile data (PR #78879)

2024-01-23 Thread Petr Hosek via cfe-commits


@@ -1,6 +1,10 @@
+include(LLVMExternalProjectUtils)
+
 set(CLANG_PGO_TRAINING_DATA "${CMAKE_CURRENT_SOURCE_DIR}" CACHE PATH
   "The path to a lit testsuite containing samples for PGO and order file 
generation"
   )
+set(CLANG_PGO_TRAINING_DATA_SOURCE_DIR OFF CACHE STRING "Path to source 
directory containing cmake project with source files to use for generating pgo 
data")
+set(CLANG_PERF_TRAINING_DEPS "" CACHE STRING "Extra dependencies needed to 
build the PGO training data.")

petrhosek wrote:

I don't see this variable being used anywhere, should it be added as a 
dependency of `generate-profraw-external`? I'd also consider naming it 
`CLANG_PGO_TRAINING_DEPS` for consistency with other variables in this file.

https://github.com/llvm/llvm-project/pull/78879
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[llvm] [libc] [clang] [lldb] [libcxx] [mlir] [openmp] [compiler-rt] [lld] [clang-tools-extra] [flang] [libc++][format] P2637R3: Member `visit` (`std::basic_format_arg`) (PR #76449)

2024-01-22 Thread Petr Hosek via cfe-commits

petrhosek wrote:

This is still broken so I'm going to revert the change.

https://github.com/llvm/llvm-project/pull/76449
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[mlir] [clang] [flang] [lld] [lldb] [openmp] [llvm] [compiler-rt] [clang-tools-extra] [libc] [libcxx] [libc++][format] P2637R3: Member `visit` (`std::basic_format_arg`) (PR #76449)

2024-01-21 Thread Petr Hosek via cfe-commits

petrhosek wrote:

Please ignore 04c85587596ab10d885a957a00c8fa22740f15c1 which addresses a 
different issue, this is still broken in tip-of-tree.

https://github.com/llvm/llvm-project/pull/76449
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options (PR #69133)

2024-01-21 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/69133
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [CMake][PGO] Add libunwind to list of stage1 runtimes (PR #78869)

2024-01-21 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/78869
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[lldb] [openmp] [lld] [compiler-rt] [clang-tools-extra] [llvm] [clang] [libcxx] [mlir] [libc] [flang] [libc++][format] P2637R3: Member `visit` (`std::basic_format_arg`) (PR #76449)

2024-01-21 Thread Petr Hosek via cfe-commits

petrhosek wrote:

The `llvm-libc++-static-clangcl.cfg.in :: 
std/utilities/format/format.arguments/format.arg/visit.return_type.pass.cpp` is 
failing on Windows with the following error:
```
Exit Code: 1

Command Output (stdout):
--
# COMPILED WITH
C:/b/s/w/ir/x/w/llvm_build/./bin/clang-cl.exe 
C:\b\s\w\ir\x\w\llvm-llvm-project\libcxx\test\std\utilities\format\format.arguments\format.arg\visit.return_type.pass.cpp
 --driver-mode=g++ --target=x86_64-pc-windows-msvc -fms-runtime-lib=static 
-nostdinc++ -I C:/b/s/w/ir/x/w/llvm_build/include/c++/v1 -I 
C:/b/s/w/ir/x/w/llvm_build/include/x86_64-pc-windows-msvc/c++/v1 -I 
C:/b/s/w/ir/x/w/llvm-llvm-project/libcxx/test/support -D_CRT_SECURE_NO_WARNINGS 
-D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX 
-std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef 
-Wunused-template -Wno-unused-command-line-argument -Wno-attributes 
-Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment 
-Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor 
-Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare 
-Wunused-variable -Wunused-parameter -Wunreachable-code 
-Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions 
-Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete 
-Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER 
-D_LIBCPP_ENABLE_EXPERIMENTAL 
-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety 
-Wuser-defined-warnings  -llibc++experimental -nostdlib -L 
C:/b/s/w/ir/x/w/llvm_build/./lib/x86_64-pc-windows-msvc -llibc++ -llibcpmt -o 
C:\b\s\w\ir\x\w\llvm_build\runtimes\runtimes-x86_64-pc-windows-msvc-bins\test\std\utilities\format\format.arguments\format.arg\Output\visit.return_type.pass.cpp.dir\t.tmp.exe
# executed command: C:/b/s/w/ir/x/w/llvm_build/./bin/clang-cl.exe 
'C:\b\s\w\ir\x\w\llvm-llvm-project\libcxx\test\std\utilities\format\format.arguments\format.arg\visit.return_type.pass.cpp'
 --driver-mode=g++ --target=x86_64-pc-windows-msvc -fms-runtime-lib=static 
-nostdinc++ -I C:/b/s/w/ir/x/w/llvm_build/include/c++/v1 -I 
C:/b/s/w/ir/x/w/llvm_build/include/x86_64-pc-windows-msvc/c++/v1 -I 
C:/b/s/w/ir/x/w/llvm-llvm-project/libcxx/test/support -D_CRT_SECURE_NO_WARNINGS 
-D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX 
-std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef 
-Wunused-template -Wno-unused-command-line-argument -Wno-attributes 
-Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment 
-Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor 
-Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare 
-Wunused-variable -Wunused-parameter -Wunreachable-code 
-Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions 
-Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete 
-Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER 
-D_LIBCPP_ENABLE_EXPERIMENTAL 
-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety 
-Wuser-defined-warnings -llibc++experimental -nostdlib -L 
C:/b/s/w/ir/x/w/llvm_build/./lib/x86_64-pc-windows-msvc -llibc++ -llibcpmt -o 
'C:\b\s\w\ir\x\w\llvm_build\runtimes\runtimes-x86_64-pc-windows-msvc-bins\test\std\utilities\format\format.arguments\format.arg\Output\visit.return_type.pass.cpp.dir\t.tmp.exe'
# .---command stderr
# | 
C:\b\s\w\ir\x\w\llvm-llvm-project\libcxx\test\std\utilities\format\format.arguments\format.arg\visit.return_type.pass.cpp:134:35:
 error: implicit conversion from 'long long' to 'const long' changes value from 
192812079084 to -461449236 [-Werror,-Wconstant-conversion]
# |   134 |   test(true, 192812079084L);
# |   |   ^
# | 
C:\b\s\w\ir\x\w\llvm-llvm-project\libcxx\test\std\utilities\format\format.arguments\format.arg\visit.return_type.pass.cpp:363:3:
 note: in instantiation of function template specialization 'test' 
requested here
# |   363 |   test();
# |   |   ^
# | 
C:\b\s\w\ir\x\w\llvm-llvm-project\libcxx\test\std\utilities\format\format.arguments\format.arg\visit.return_type.pass.cpp:135:36:
 error: implicit conversion from 'long long' to 'const long' changes value from 
192812079084 to -461449236 [-Werror,-Wconstant-conversion]
# |   135 |   test(false, 192812079084L);
# |   |    ^
# | 
C:\b\s\w\ir\x\w\llvm-llvm-project\libcxx\test\std\utilities\format\format.arguments\format.arg\visit.return_type.pass.cpp:40:12:
 error: implicit conversion from 'long long' to 'long' changes value from 
192812079084 to -461449236 [-Werror,-Wconstant-conversion]
# |40 | return 192812079084L;
# |   | ~~ ^
# | 
C:\b\s\w\ir\x\w\llvm-llvm-project\libcxx\test\std\utilities\format\format.arguments\format.arg\visit.return_type.pass.cpp:60:20:
 note: in instantiation of function template 

[clang] [Coverage] Map regions from system headers (PR #76950)

2024-01-20 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/76950
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [CMake][Release] Add option for enabling PGO to release cache file. (PR #78823)

2024-01-20 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/78823
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [CMake][Release] Add option for enabling PGO to release cache file. (PR #78823)

2024-01-20 Thread Petr Hosek via cfe-commits


@@ -37,11 +63,26 @@ set(BOOTSTRAP_CLANG_BOOTSTRAP_TARGETS
 
 # Stage 2 Options
 set(STAGE2_PROJECTS "clang")
-if (LLVM_RELEASE_ENABLE_LTO)
+set(STAGE2_RUNTIMES "")
+
+if (LLVM_RELEASE_ENABLE_LTO OR LLVM_RELEASE_ENABLE_PGO)
  list(APPEND STAGE2_PROJECTS "lld")
 endif()
+
+if (LLVM_RELEASE_ENABLE_PGO)
+  set(BOOTSTRAP_LLVM_BUILD_INSTRUMENTED ON CACHE BOOL "")

petrhosek wrote:

```suggestion
  set(BOOTSTRAP_LLVM_BUILD_INSTRUMENTED IR CACHE STRING "")
```

https://github.com/llvm/llvm-project/pull/78823
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain (PR #78323)

2024-01-16 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek closed 
https://github.com/llvm/llvm-project/pull/78323
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain (PR #78323)

2024-01-16 Thread Petr Hosek via cfe-commits

petrhosek wrote:

This is a reland of 78550bef98347bccbf0e8e5fb66dc59718fc35ec, the 
cross-compilation issues should be resolved now.

https://github.com/llvm/llvm-project/pull/78323
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain (PR #78323)

2024-01-16 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek created 
https://github.com/llvm/llvm-project/pull/78323

This contains compiler-rt builtins and llvm-libc for baremetal use.

Differential Revision: https://reviews.llvm.org/D155337

>From 900df95c16d8bef6f9758cd53db39bb885097cc7 Mon Sep 17 00:00:00 2001
From: Petr Hosek 
Date: Sun, 7 Jan 2024 18:13:39 -0800
Subject: [PATCH] [CMake] Include riscv32-unknown-elf runtimes in Fuchsia
 toolchain (#76849)

This contains compiler-rt builtins and llvm-libc for baremetal use.

Differential Revision: https://reviews.llvm.org/D155337
---
 clang/cmake/caches/Fuchsia-stage2.cmake | 38 -
 clang/cmake/caches/Fuchsia.cmake|  3 +-
 2 files changed, 39 insertions(+), 2 deletions(-)

diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake 
b/clang/cmake/caches/Fuchsia-stage2.cmake
index c4673c8a54c5ef5..eee37c5e7901fae 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -6,7 +6,7 @@ set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64;RISCV CACHE STRING "")
 
 set(PACKAGE_VENDOR Fuchsia CACHE STRING "")
 
-set(_FUCHSIA_ENABLE_PROJECTS "bolt;clang;clang-tools-extra;lld;llvm;polly")
+set(_FUCHSIA_ENABLE_PROJECTS 
"bolt;clang;clang-tools-extra;libc;lld;llvm;polly")
 set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING 
"")
 
 set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
@@ -22,8 +22,11 @@ set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "")
 set(LLVM_ENABLE_UNWIND_TABLES OFF CACHE BOOL "")
 set(LLVM_ENABLE_Z3_SOLVER OFF CACHE BOOL "")
 set(LLVM_ENABLE_ZLIB ON CACHE BOOL "")
+set(LLVM_FORCE_BUILD_RUNTIME ON CACHE BOOL "")
 set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
 set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
+set(LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
+set(LIBC_HDRGEN_ONLY ON CACHE BOOL "")
 set(LLVM_STATIC_LINK_CXX_STDLIB ON CACHE BOOL "")
 set(LLVM_USE_RELATIVE_PATHS_IN_FILES ON CACHE BOOL "")
 set(LLDB_ENABLE_CURSES OFF CACHE BOOL "")
@@ -297,6 +300,39 @@ if(FUCHSIA_SDK)
   set(LLVM_RUNTIME_MULTILIB_hwasan+noexcept_TARGETS 
"aarch64-unknown-fuchsia;riscv64-unknown-fuchsia" CACHE STRING "")
 endif()
 
+foreach(target riscv32-unknown-elf)
+  list(APPEND BUILTIN_TARGETS "${target}")
+  set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR RISCV CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_SYSROOT "" CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+  foreach(lang C;CXX;ASM)
+set(BUILTINS_${target}_CMAKE_${lang}_FLAGS "--target=${target} 
-march=rv32imafc -mabi=ilp32f" CACHE STRING "")
+  endforeach()
+  foreach(type SHARED;MODULE;EXE)
+set(BUILTINS_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE 
STRING "")
+  endforeach()
+  set(BUILTINS_${target}_COMPILER_RT_BAREMETAL_BUILD ON CACHE BOOL "")
+
+  list(APPEND RUNTIME_TARGETS "${target}")
+  set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_SYSTEM_PROCESSOR RISCV CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_SYSROOT "" CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY CACHE 
STRING "")
+  foreach(lang C;CXX;ASM)
+set(RUNTIMES_${target}_CMAKE_${lang}_FLAGS "--target=${target} 
-march=rv32imafc -mabi=ilp32f" CACHE STRING "")
+  endforeach()
+  foreach(type SHARED;MODULE;EXE)
+set(RUNTIMES_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE 
STRING "")
+  endforeach()
+  set(RUNTIMES_${target}_LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
+  set(RUNTIMES_${target}_LIBC_ENABLE_USE_BY_CLANG ON CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "libc" CACHE STRING "")
+endforeach()
+
 set(LLVM_BUILTIN_TARGETS "${BUILTIN_TARGETS}" CACHE STRING "")
 set(LLVM_RUNTIME_TARGETS "${RUNTIME_TARGETS}" CACHE STRING "")
 
diff --git a/clang/cmake/caches/Fuchsia.cmake b/clang/cmake/caches/Fuchsia.cmake
index bb2ed30690098e5..fe925901eb3dce7 100644
--- a/clang/cmake/caches/Fuchsia.cmake
+++ b/clang/cmake/caches/Fuchsia.cmake
@@ -6,7 +6,7 @@ set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64;RISCV CACHE STRING "")
 
 set(PACKAGE_VENDOR Fuchsia CACHE STRING "")
 
-set(_FUCHSIA_ENABLE_PROJECTS "bolt;clang;clang-tools-extra;lld;llvm;polly")
+set(_FUCHSIA_ENABLE_PROJECTS 
"bolt;clang;clang-tools-extra;libc;lld;llvm;polly")
 
 set(LLVM_ENABLE_DIA_SDK OFF CACHE BOOL "")
 set(LLVM_ENABLE_LIBEDIT OFF CACHE BOOL "")
@@ -18,6 +18,7 @@ set(LLVM_ENABLE_Z3_SOLVER OFF CACHE BOOL "")
 set(LLVM_ENABLE_ZLIB OFF CACHE BOOL "")
 set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
 set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
+set(LIBC_HDRGEN_ONLY ON CACHE BOOL "")
 set(LLVM_USE_RELATIVE_PATHS_IN_FILES ON CACHE BOOL "")
 set(LLDB_ENABLE_CURSES OFF CACHE BOOL "")
 set(LLDB_ENABLE_LIBEDIT OFF 

[clang] [llvm] [CMake][PGO] Build Sema.cpp to generate profdata for PGO builds (PR #77347)

2024-01-16 Thread Petr Hosek via cfe-commits


@@ -26,9 +30,23 @@ if(LLVM_BUILD_INSTRUMENTED)
 message(STATUS "To enable merging PGO data LLVM_PROFDATA has to point to 
llvm-profdata")
   else()
 add_custom_target(generate-profdata
-  COMMAND "${Python3_EXECUTABLE}" 
${CMAKE_CURRENT_SOURCE_DIR}/perf-helper.py merge ${LLVM_PROFDATA} 
${CMAKE_CURRENT_BINARY_DIR}/clang.profdata ${CMAKE_CURRENT_BINARY_DIR}
+  COMMAND "${Python3_EXECUTABLE}" 
${CMAKE_CURRENT_SOURCE_DIR}/perf-helper.py merge ${LLVM_PROFDATA} 
${CMAKE_CURRENT_BINARY_DIR}/clang.profdata ${CMAKE_CURRENT_BINARY_DIR} 
${CMAKE_BINARY_DIR}/profiles/
   COMMENT "Merging profdata"
   DEPENDS generate-profraw)
+if (CLANG_PGO_TRAINING_DATA_SOURCE_DIR)
+  llvm_ExternalProject_Add(generate-profraw-external 
${CLANG_PGO_TRAINING_DATA_SOURCE_DIR}
+  USE_TOOLCHAIN EXLUDE_FROM_ALL NO_INSTALL DEPENDS 
generate-profraw)
+  add_dependencies(generate-profdata generate-profraw-external)
+else()
+  # Default to compiling a file from clang. This also builds all the
+  # dependencies needed to build this file, like TableGen.
+  set(generate_profraw_clang_sema 
tools/clang/lib/Sema/CMakeFiles/obj.clangSema.dir/Sema.cpp.o)
+  llvm_ExternalProject_Add(generate-profraw-clang 
${CMAKE_CURRENT_SOURCE_DIR}/../../../llvm
+  USE_TOOLCHAIN EXLUDE_FROM_ALL NO_INSTALL DEPENDS generate-profraw
+  EXTRA_TARGETS generate_profraw_clang_sema

petrhosek wrote:

The idea I'd like explore is using libc++ (and perhaps also libc) test suite 
for training. It consists of self-contained test programs which should 
sufficiently exercise various aspects of C/C++ frontend.

https://github.com/llvm/llvm-project/pull/77347
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[compiler-rt] [lld] [mlir] [libcxx] [libcxxabi] [openmp] [llvm] [clang] [runtimes] Use LLVM libunwind from libc++abi by default (PR #77687)

2024-01-16 Thread Petr Hosek via cfe-commits

petrhosek wrote:

> @petrhosek @ldionne would it be better detect libunwind in 
> LLVM_ENABLE_RUNTIMES?
> 
> Asking because we have similar thing in compiler-rt, e.g. for lld, and I am 
> not sure which approach is better: There are trade offs:
> 
> 1. checking LLVM_ENABLE_RUNTIMES simplify end user experience
> 2. forcing default  ON simplifies cmake files and avoids unexpected use of 
> system lib

That would be my preference, specifically I'd set the default for 
`LIBCXXABI_USE_LLVM_UNWINDER` based on whether `libunwind` is present in 
`LLVM_ENABLE_RUNTIMES` (but still let user override it).

https://github.com/llvm/llvm-project/pull/77687
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[lld] [compiler-rt] [clang] [openmp] [mlir] [libcxxabi] [libcxx] [llvm] [runtimes] Use LLVM libunwind from libc++abi by default (PR #77687)

2024-01-10 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/77687
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libunwind] [libunwind] Convert a few options from CACHE PATH to CACHE STRING (PR #77534)

2024-01-09 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/77534
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [CMake][Release] Add option for enabling LTO to cache file (PR #77035)

2024-01-09 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/77035
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [CMake][PGO] Use check targets to generate profdata for PGO builds (PR #77347)

2024-01-08 Thread Petr Hosek via cfe-commits

petrhosek wrote:

I'd also prefer to make this configurable, we're using our own corpus which in 
my experiments both produces better results and takes less time than 
`check-llvm` and `check-clang`.

We should also consider updating the documentation since I don't think that 
`check-llvm` and `check-clang` is what we should be recommending; LLVM and 
Clang tests have different goal, that is to provide maximum coverage which 
often means exercising various corner cases and error conditions, but these are 
not helpful when collecting profiles, in fact they can be harmful.

I think that [LLVM test-suite](https://github.com/llvm/llvm-test-suite/) is 
actually a better fit since more representative of real code. In our  training 
corpus, I for example use 
[CppPerformanceBenchmarks](https://gitlab.com/chriscox/CppPerformanceBenchmarks)
 (an older version is also [included in LLVM test 
suite](https://github.com/llvm/llvm-test-suite/tree/9ca97f5027150f7e507e5ab4c56f38a29fb3c696/SingleSource/Benchmarks/Adobe-C%2B%2B)).

https://github.com/llvm/llvm-project/pull/77347
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] a90ed3e - Revert "[CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain (#76849)"

2024-01-07 Thread Petr Hosek via cfe-commits

Author: Petr Hosek
Date: 2024-01-08T03:29:30Z
New Revision: a90ed3e8a4ea8c5238fd660bbac0371366afe3b5

URL: 
https://github.com/llvm/llvm-project/commit/a90ed3e8a4ea8c5238fd660bbac0371366afe3b5
DIFF: 
https://github.com/llvm/llvm-project/commit/a90ed3e8a4ea8c5238fd660bbac0371366afe3b5.diff

LOG: Revert "[CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain 
(#76849)"

This reverts commit 78550bef98347bccbf0e8e5fb66dc59718fc35ec since
it broke the two stage build.

Added: 


Modified: 
clang/cmake/caches/Fuchsia-stage2.cmake

Removed: 




diff  --git a/clang/cmake/caches/Fuchsia-stage2.cmake 
b/clang/cmake/caches/Fuchsia-stage2.cmake
index eee37c5e7901fa..c4673c8a54c5ef 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -6,7 +6,7 @@ set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64;RISCV CACHE STRING "")
 
 set(PACKAGE_VENDOR Fuchsia CACHE STRING "")
 
-set(_FUCHSIA_ENABLE_PROJECTS 
"bolt;clang;clang-tools-extra;libc;lld;llvm;polly")
+set(_FUCHSIA_ENABLE_PROJECTS "bolt;clang;clang-tools-extra;lld;llvm;polly")
 set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING 
"")
 
 set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
@@ -22,11 +22,8 @@ set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "")
 set(LLVM_ENABLE_UNWIND_TABLES OFF CACHE BOOL "")
 set(LLVM_ENABLE_Z3_SOLVER OFF CACHE BOOL "")
 set(LLVM_ENABLE_ZLIB ON CACHE BOOL "")
-set(LLVM_FORCE_BUILD_RUNTIME ON CACHE BOOL "")
 set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
 set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
-set(LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
-set(LIBC_HDRGEN_ONLY ON CACHE BOOL "")
 set(LLVM_STATIC_LINK_CXX_STDLIB ON CACHE BOOL "")
 set(LLVM_USE_RELATIVE_PATHS_IN_FILES ON CACHE BOOL "")
 set(LLDB_ENABLE_CURSES OFF CACHE BOOL "")
@@ -300,39 +297,6 @@ if(FUCHSIA_SDK)
   set(LLVM_RUNTIME_MULTILIB_hwasan+noexcept_TARGETS 
"aarch64-unknown-fuchsia;riscv64-unknown-fuchsia" CACHE STRING "")
 endif()
 
-foreach(target riscv32-unknown-elf)
-  list(APPEND BUILTIN_TARGETS "${target}")
-  set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
-  set(BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR RISCV CACHE STRING "")
-  set(BUILTINS_${target}_CMAKE_SYSROOT "" CACHE STRING "")
-  set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
-  foreach(lang C;CXX;ASM)
-set(BUILTINS_${target}_CMAKE_${lang}_FLAGS "--target=${target} 
-march=rv32imafc -mabi=ilp32f" CACHE STRING "")
-  endforeach()
-  foreach(type SHARED;MODULE;EXE)
-set(BUILTINS_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE 
STRING "")
-  endforeach()
-  set(BUILTINS_${target}_COMPILER_RT_BAREMETAL_BUILD ON CACHE BOOL "")
-
-  list(APPEND RUNTIME_TARGETS "${target}")
-  set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
-  set(RUNTIMES_${target}_CMAKE_SYSTEM_PROCESSOR RISCV CACHE STRING "")
-  set(RUNTIMES_${target}_CMAKE_SYSROOT "" CACHE STRING "")
-  set(RUNTIMES_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
-  set(RUNTIMES_${target}_CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY CACHE 
STRING "")
-  foreach(lang C;CXX;ASM)
-set(RUNTIMES_${target}_CMAKE_${lang}_FLAGS "--target=${target} 
-march=rv32imafc -mabi=ilp32f" CACHE STRING "")
-  endforeach()
-  foreach(type SHARED;MODULE;EXE)
-set(RUNTIMES_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE 
STRING "")
-  endforeach()
-  set(RUNTIMES_${target}_LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
-  set(RUNTIMES_${target}_LIBC_ENABLE_USE_BY_CLANG ON CACHE BOOL "")
-  set(RUNTIMES_${target}_LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
-  set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "")
-  set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "libc" CACHE STRING "")
-endforeach()
-
 set(LLVM_BUILTIN_TARGETS "${BUILTIN_TARGETS}" CACHE STRING "")
 set(LLVM_RUNTIME_TARGETS "${RUNTIME_TARGETS}" CACHE STRING "")
 



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain (PR #76849)

2024-01-07 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek closed 
https://github.com/llvm/llvm-project/pull/76849
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain (PR #76849)

2024-01-07 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek updated 
https://github.com/llvm/llvm-project/pull/76849

>From 0cb22bea1e724ca62306081da2ae97bbcc395a86 Mon Sep 17 00:00:00 2001
From: Petr Hosek 
Date: Fri, 9 Jun 2023 07:17:13 +
Subject: [PATCH] [CMake] Include riscv32-unknown-elf runtimes in Fuchsia
 toolchain

This contains compiler-rt builtins and llvm-libc for baremetal use.

Differential Revision: https://reviews.llvm.org/D155337
---
 clang/cmake/caches/Fuchsia-stage2.cmake | 38 -
 1 file changed, 37 insertions(+), 1 deletion(-)

diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake 
b/clang/cmake/caches/Fuchsia-stage2.cmake
index c4673c8a54c5ef..eee37c5e7901fa 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -6,7 +6,7 @@ set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64;RISCV CACHE STRING "")
 
 set(PACKAGE_VENDOR Fuchsia CACHE STRING "")
 
-set(_FUCHSIA_ENABLE_PROJECTS "bolt;clang;clang-tools-extra;lld;llvm;polly")
+set(_FUCHSIA_ENABLE_PROJECTS 
"bolt;clang;clang-tools-extra;libc;lld;llvm;polly")
 set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING 
"")
 
 set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
@@ -22,8 +22,11 @@ set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "")
 set(LLVM_ENABLE_UNWIND_TABLES OFF CACHE BOOL "")
 set(LLVM_ENABLE_Z3_SOLVER OFF CACHE BOOL "")
 set(LLVM_ENABLE_ZLIB ON CACHE BOOL "")
+set(LLVM_FORCE_BUILD_RUNTIME ON CACHE BOOL "")
 set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
 set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
+set(LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
+set(LIBC_HDRGEN_ONLY ON CACHE BOOL "")
 set(LLVM_STATIC_LINK_CXX_STDLIB ON CACHE BOOL "")
 set(LLVM_USE_RELATIVE_PATHS_IN_FILES ON CACHE BOOL "")
 set(LLDB_ENABLE_CURSES OFF CACHE BOOL "")
@@ -297,6 +300,39 @@ if(FUCHSIA_SDK)
   set(LLVM_RUNTIME_MULTILIB_hwasan+noexcept_TARGETS 
"aarch64-unknown-fuchsia;riscv64-unknown-fuchsia" CACHE STRING "")
 endif()
 
+foreach(target riscv32-unknown-elf)
+  list(APPEND BUILTIN_TARGETS "${target}")
+  set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR RISCV CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_SYSROOT "" CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+  foreach(lang C;CXX;ASM)
+set(BUILTINS_${target}_CMAKE_${lang}_FLAGS "--target=${target} 
-march=rv32imafc -mabi=ilp32f" CACHE STRING "")
+  endforeach()
+  foreach(type SHARED;MODULE;EXE)
+set(BUILTINS_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE 
STRING "")
+  endforeach()
+  set(BUILTINS_${target}_COMPILER_RT_BAREMETAL_BUILD ON CACHE BOOL "")
+
+  list(APPEND RUNTIME_TARGETS "${target}")
+  set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_SYSTEM_PROCESSOR RISCV CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_SYSROOT "" CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY CACHE 
STRING "")
+  foreach(lang C;CXX;ASM)
+set(RUNTIMES_${target}_CMAKE_${lang}_FLAGS "--target=${target} 
-march=rv32imafc -mabi=ilp32f" CACHE STRING "")
+  endforeach()
+  foreach(type SHARED;MODULE;EXE)
+set(RUNTIMES_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE 
STRING "")
+  endforeach()
+  set(RUNTIMES_${target}_LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
+  set(RUNTIMES_${target}_LIBC_ENABLE_USE_BY_CLANG ON CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "libc" CACHE STRING "")
+endforeach()
+
 set(LLVM_BUILTIN_TARGETS "${BUILTIN_TARGETS}" CACHE STRING "")
 set(LLVM_RUNTIME_TARGETS "${RUNTIME_TARGETS}" CACHE STRING "")
 

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] [CMake] Include riscv32-unknown-elf runtimes in Fuchsia toolchain (PR #76849)

2024-01-03 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek created 
https://github.com/llvm/llvm-project/pull/76849

This contains compiler-rt builtins and llvm-libc for baremetal use.

Differential Revision: https://reviews.llvm.org/D155337

>From 01dd937d31d398188e0f7c39d2318375e761a3ba Mon Sep 17 00:00:00 2001
From: Petr Hosek 
Date: Fri, 9 Jun 2023 07:17:13 +
Subject: [PATCH] [CMake] Include riscv32-unknown-elf runtimes in Fuchsia
 toolchain

This contains compiler-rt builtins and llvm-libc for baremetal use.

Differential Revision: https://reviews.llvm.org/D155337
---
 clang/cmake/caches/Fuchsia-stage2.cmake | 38 -
 llvm/runtimes/CMakeLists.txt|  2 +-
 2 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake 
b/clang/cmake/caches/Fuchsia-stage2.cmake
index c4673c8a54c5ef..eee37c5e7901fa 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -6,7 +6,7 @@ set(LLVM_TARGETS_TO_BUILD X86;ARM;AArch64;RISCV CACHE STRING "")
 
 set(PACKAGE_VENDOR Fuchsia CACHE STRING "")
 
-set(_FUCHSIA_ENABLE_PROJECTS "bolt;clang;clang-tools-extra;lld;llvm;polly")
+set(_FUCHSIA_ENABLE_PROJECTS 
"bolt;clang;clang-tools-extra;libc;lld;llvm;polly")
 set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE STRING 
"")
 
 set(LLVM_ENABLE_BACKTRACES OFF CACHE BOOL "")
@@ -22,8 +22,11 @@ set(LLVM_ENABLE_TERMINFO OFF CACHE BOOL "")
 set(LLVM_ENABLE_UNWIND_TABLES OFF CACHE BOOL "")
 set(LLVM_ENABLE_Z3_SOLVER OFF CACHE BOOL "")
 set(LLVM_ENABLE_ZLIB ON CACHE BOOL "")
+set(LLVM_FORCE_BUILD_RUNTIME ON CACHE BOOL "")
 set(LLVM_INCLUDE_DOCS OFF CACHE BOOL "")
 set(LLVM_INCLUDE_EXAMPLES OFF CACHE BOOL "")
+set(LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
+set(LIBC_HDRGEN_ONLY ON CACHE BOOL "")
 set(LLVM_STATIC_LINK_CXX_STDLIB ON CACHE BOOL "")
 set(LLVM_USE_RELATIVE_PATHS_IN_FILES ON CACHE BOOL "")
 set(LLDB_ENABLE_CURSES OFF CACHE BOOL "")
@@ -297,6 +300,39 @@ if(FUCHSIA_SDK)
   set(LLVM_RUNTIME_MULTILIB_hwasan+noexcept_TARGETS 
"aarch64-unknown-fuchsia;riscv64-unknown-fuchsia" CACHE STRING "")
 endif()
 
+foreach(target riscv32-unknown-elf)
+  list(APPEND BUILTIN_TARGETS "${target}")
+  set(BUILTINS_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_SYSTEM_PROCESSOR RISCV CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_SYSROOT "" CACHE STRING "")
+  set(BUILTINS_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+  foreach(lang C;CXX;ASM)
+set(BUILTINS_${target}_CMAKE_${lang}_FLAGS "--target=${target} 
-march=rv32imafc -mabi=ilp32f" CACHE STRING "")
+  endforeach()
+  foreach(type SHARED;MODULE;EXE)
+set(BUILTINS_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE 
STRING "")
+  endforeach()
+  set(BUILTINS_${target}_COMPILER_RT_BAREMETAL_BUILD ON CACHE BOOL "")
+
+  list(APPEND RUNTIME_TARGETS "${target}")
+  set(RUNTIMES_${target}_CMAKE_SYSTEM_NAME Generic CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_SYSTEM_PROCESSOR RISCV CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_SYSROOT "" CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "")
+  set(RUNTIMES_${target}_CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY CACHE 
STRING "")
+  foreach(lang C;CXX;ASM)
+set(RUNTIMES_${target}_CMAKE_${lang}_FLAGS "--target=${target} 
-march=rv32imafc -mabi=ilp32f" CACHE STRING "")
+  endforeach()
+  foreach(type SHARED;MODULE;EXE)
+set(RUNTIMES_${target}_CMAKE_${type}_LINKER_FLAGS "-fuse-ld=lld" CACHE 
STRING "")
+  endforeach()
+  set(RUNTIMES_${target}_LLVM_LIBC_FULL_BUILD ON CACHE BOOL "")
+  set(RUNTIMES_${target}_LIBC_ENABLE_USE_BY_CLANG ON CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_INCLUDE_TESTS OFF CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_ENABLE_ASSERTIONS OFF CACHE BOOL "")
+  set(RUNTIMES_${target}_LLVM_ENABLE_RUNTIMES "libc" CACHE STRING "")
+endforeach()
+
 set(LLVM_BUILTIN_TARGETS "${BUILTIN_TARGETS}" CACHE STRING "")
 set(LLVM_RUNTIME_TARGETS "${RUNTIME_TARGETS}" CACHE STRING "")
 
diff --git a/llvm/runtimes/CMakeLists.txt b/llvm/runtimes/CMakeLists.txt
index 77254b7eb5e622..cd2494cf0d3a45 100644
--- a/llvm/runtimes/CMakeLists.txt
+++ b/llvm/runtimes/CMakeLists.txt
@@ -414,7 +414,7 @@ if(runtimes)
   endif()
 endforeach()
   endif()
-  if("libc" IN_LIST LLVM_ENABLE_RUNTIMES AND 
+  if("libc" IN_LIST LLVM_ENABLE_RUNTIMES AND
   (LLVM_LIBC_FULL_BUILD OR LIBC_GPU_BUILD OR LIBC_GPU_ARCHITECTURES))
 if(TARGET libc-hdrgen)
   set(libc_tools libc-hdrgen)

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][Darwin] Remove legacy framework search path logic in the frontend (PR #75841)

2024-01-01 Thread Petr Hosek via cfe-commits

petrhosek wrote:

This appears to have broken the LSan build which is now failing with the 
following error:
```
FAILED: 
compiler-rt/lib/lsan/CMakeFiles/clang_rt.lsan_osx_dynamic.dir/lsan_malloc_mac.cpp.o
 
/Volumes/Work/s/w/ir/x/w/llvm_build/./bin/clang++ 
--target=x86_64-apple-darwin22.6.0 
--sysroot=/Volumes/Work/s/w/ir/cache/macos_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk
 -DCOMPILER_RT_SHARED_LIB -D_DEBUG -D_GLIBCXX_ASSERTIONS 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-Dclang_rt_lsan_osx_dynamic_EXPORTS 
-I/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/lsan/.. -fPIC 
-fvisibility-inlines-hidden -Werror=date-time 
-Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter 
-Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough 
-Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor 
-Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion 
-Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color 
-ffile-prefix-map=/Volumes/Work/s/w/ir/x/w/llvm_build/runtimes/runtimes-bins=../../../llvm-llvm-project
 -ffile-prefix-map=/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/= 
-no-canonical-prefixes -Wall -Wno-unused-parameter -O3 -DNDEBUG -std=c++17 
-arch arm64 -arch x86_64 -isysroot 
/Volumes/Work/s/w/ir/cache/macos_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk
 -fPIC -stdlib=libc++ -mmacosx-version-min=10.10 -isysroot 
/Volumes/Work/s/w/ir/cache/macos_sdk/XCode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk
 -fno-lto -fPIC -fno-builtin -fno-exceptions -funwind-tables 
-fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden 
-Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -g -Wno-gnu 
-Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -fno-rtti -Wno-format -MD 
-MT 
compiler-rt/lib/lsan/CMakeFiles/clang_rt.lsan_osx_dynamic.dir/lsan_malloc_mac.cpp.o
 -MF 
compiler-rt/lib/lsan/CMakeFiles/clang_rt.lsan_osx_dynamic.dir/lsan_malloc_mac.cpp.o.d
 -o 
compiler-rt/lib/lsan/CMakeFiles/clang_rt.lsan_osx_dynamic.dir/lsan_malloc_mac.cpp.o
 -c 
/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/lsan/lsan_malloc_mac.cpp
In file included from 
/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/lsan/lsan_malloc_mac.cpp:57:
/Volumes/Work/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/lsan/../sanitizer_common/sanitizer_malloc_mac.inc:20:10:
 fatal error: 'CoreFoundation/CFBase.h' file not found
   20 | #include 
  |  ^
1 error generated.
```

https://github.com/llvm/llvm-project/pull/75841
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[compiler-rt] [lld] [lldb] [flang] [clang] [mlir] [llvm] [libcxx] [builtins] Refactor cpu_model support to reduce #if nesting. NFCI (PR #75635)

2023-12-20 Thread Petr Hosek via cfe-commits

petrhosek wrote:

I have discovered another issue, on Fuchsia `libclang_rt.builtins.a` now has a 
reference to `getauxval` which it didn't have before. This is really 
undesirable because on Fuchsia, there's no `auxv` to begin with. I believe this 
is because before, the `__init_cpu_features` definition was guarded by:

```
#if defined(__has_include)
#if __has_include()
#include 
...
#if __has_include()
#include 
```
These `#if __has_include(...)` conditionals would evaluate to false on Fuchsia 
since we don't have those headers, but they have been moved in the refactored 
version.

https://github.com/llvm/llvm-project/pull/75635
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang][CodeGen] Always use CLANG_VENDOR as a quoted string (PR #75935)

2023-12-19 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek requested changes to this pull request.

I agree with @smeenai, we shouldn't be setting `CLANG_VENDOR` as a global 
define.

https://github.com/llvm/llvm-project/pull/75935
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[flang] [clang] [lld] [lldb] [libcxx] [mlir] [llvm] [compiler-rt] [builtins] Refactor cpu_model support to reduce #if nesting. NFCI (PR #75635)

2023-12-19 Thread Petr Hosek via cfe-commits

petrhosek wrote:

We're still seeing the following error on our builders:
```
/b/s/w/ir/x/w/llvm_build/./bin/clang --target=aarch64-unknown-linux-gnu 
--sysroot=/b/s/w/ir/x/w/cipd/linux -DHAS_ASM_LSE -DVISIBILITY_HIDDEN  
--target=aarch64-unknown-linux-gnu -O2 -g -DNDEBUG -fno-lto -std=c11 -fPIC 
-fno-builtin -fvisibility=hidden -fomit-frame-pointer -DCOMPILER_RT_HAS_FLOAT16 
-MD -MT CMakeFiles/clang_rt.builtins-aarch64.dir/cpu_model/aarch64.c.o -MF 
CMakeFiles/clang_rt.builtins-aarch64.dir/cpu_model/aarch64.c.o.d -o 
CMakeFiles/clang_rt.builtins-aarch64.dir/cpu_model/aarch64.c.o -c 
/b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/builtins/cpu_model/aarch64.c
In file included from 
/b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/builtins/cpu_model/aarch64.c:43:
/b/s/w/ir/x/w/llvm-llvm-project/compiler-rt/lib/builtins/cpu_model/aarch64/lse_atomics/sysauxv.inc:5:41:
 error: use of undeclared identifier 'HWCAP_ATOMICS'
5 |   __aarch64_have_lse_atomics = (hwcap & HWCAP_ATOMICS) != 0;
  | ^
1 error generated.
```

https://github.com/llvm/llvm-project/pull/75635
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Sema] Provide `-fno-/-fvisibility-global-new-delete` option (PR #75364)

2023-12-19 Thread Petr Hosek via cfe-commits

petrhosek wrote:

I don't think it's very clear from `-f[no-]visibility-global-new-delete` what 
the option does. How about `-f[no-]visibility-attribute-global-new-delete`?

https://github.com/llvm/llvm-project/pull/75364
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libunwind] [libunwind] Use -nostdlib++ when linking libunwind (PR #75646)

2023-12-19 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/75646
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [llvm] test-release.sh: Add a CMake cache file for 3-stage release builds (PR #75903)

2023-12-19 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.

Out of curiosity, what's the reason for using 3-stage (rather than 2-stage) 
build?

https://github.com/llvm/llvm-project/pull/75903
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] [compiler-rt] [libc] [llvm] [clang] [compiler-rt]Add lld into dependency for apple builds now that lld Mach-O backend is available (PR #75884)

2023-12-18 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/75884
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libunwind] [libcxx] [libcxxabi] [runtimes] Don't link against compiler-rt explicitly when we use -nostdlib++ (PR #75089)

2023-12-14 Thread Petr Hosek via cfe-commits

petrhosek wrote:

> > I'm trying to implement support for building libunwind, libc++abi and 
> > libc++ against LLVM libc in which case we won't be able to rely on 
> > `-nostdlib++`, we'll need to use `-nostdlib` to avoid linking the C 
> > library. We can still use `-nostdlib++` when LLVM libc isn't being used 
> > used, but a lot of this logic will need to be refactored to support the new 
> > use case. With that in mind, I'm fine with change as an interim solution.
> 
> Is there a reason why `-nostdlib` also drops compiler-rt? If `-nostdlib++` 
> affects only the C++ library, it would make sense that `-nostdlib` affects 
> only the C library?

The reason is matching the behavior of GCC, but given that I don't think we can 
change the current semantics.

https://github.com/llvm/llvm-project/pull/75089
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libunwind] [libcxxabi] [libcxx] [runtimes] Don't link against compiler-rt explicitly when we use -nostdlib++ (PR #75089)

2023-12-13 Thread Petr Hosek via cfe-commits

petrhosek wrote:

I'm trying to implement support for building libunwind, libc++abi and libc++ 
against LLVM libc in which case we won't be able to rely on `-nostdlib++`, 
we'll need to use `-nostdlib` to avoid linking the C library. We can still use 
`-nostdlib++` when LLVM libc isn't being used used, but a lot of this logic 
will need to be refactored to support the new use case. With that in mind, I'm 
fine with change as an interim solution.

https://github.com/llvm/llvm-project/pull/75089
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[flang] [lldb] [clang-tools-extra] [clang] [mlir] [llvm] [compiler-rt] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-12-13 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/69493
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [RISCV][RFC] BareMetal multilibs YAML usage (PR #75191)

2023-12-13 Thread Petr Hosek via cfe-commits

petrhosek wrote:

Regarding `-f[no-]exceptions` handling, see 
https://discourse.llvm.org/t/rfc-multilib/67494/32.

https://github.com/llvm/llvm-project/pull/75191
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [CMake] Include opt-viewer in Fuchsia toolchain (PR #75296)

2023-12-13 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek created 
https://github.com/llvm/llvm-project/pull/75296

This is necessary for visualization of optimization remarks.

>From a35caa1369eabff183eb192fd4ad7566e55c8ea6 Mon Sep 17 00:00:00 2001
From: Petr Hosek 
Date: Wed, 13 Dec 2023 08:03:37 +
Subject: [PATCH] [CMake] Include opt-viewer in Fuchsia toolchain

This is necessary for visualization of optimization remarks.
---
 clang/cmake/caches/Fuchsia-stage2.cmake | 1 +
 1 file changed, 1 insertion(+)

diff --git a/clang/cmake/caches/Fuchsia-stage2.cmake 
b/clang/cmake/caches/Fuchsia-stage2.cmake
index 4b9085d99378c6..c4673c8a54c5ef 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -336,6 +336,7 @@ set(LLVM_TOOLCHAIN_TOOLS
   llvm-symbolizer
   llvm-undname
   llvm-xray
+  opt-viewer
   sancov
   scan-build-py
   CACHE STRING "")

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][InstrProf] Allow mix-up of absolute path with relative path on command line when using -fprofile-list= (PR #67519)

2023-12-11 Thread Petr Hosek via cfe-commits

petrhosek wrote:

I think we should close it, the current behavior is as expected.

https://github.com/llvm/llvm-project/pull/67519
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][InstrProf] Allow mix-up of absolute path with relative path on command line when using -fprofile-list= (PR #67519)

2023-12-11 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek closed 
https://github.com/llvm/llvm-project/pull/67519
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[llvm] [clang] [SpecialCaseList] Use glob by default (PR #74809)

2023-12-08 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/74809
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang-tools-extra] [mlir] [compiler-rt] [llvm] [lldb] [clang] [flang] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-12-05 Thread Petr Hosek via cfe-commits

petrhosek wrote:

Can you break up all the changes to tests that replace `-debug-info-correlate` 
with `--profile-correlate=debug-info` into a separate PR to reduce the size of 
this PR?

https://github.com/llvm/llvm-project/pull/69493
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang-tools-extra] [mlir] [compiler-rt] [llvm] [lldb] [clang] [flang] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-12-05 Thread Petr Hosek via cfe-commits


@@ -702,6 +708,8 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure,
 #define INSTR_PROF_COVMAP_COMMON __llvm_covmap
 #define INSTR_PROF_COVFUN_COMMON __llvm_covfun
 #define INSTR_PROF_ORDERFILE_COMMON __llvm_orderfile

petrhosek wrote:

This just a nit, but could you move `orderfile` here and elsewhere to the 
bottom so that all `__llvm_cov*` entries are next to each other for easier 
readability.

https://github.com/llvm/llvm-project/pull/69493
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix documentation on PGO/coverage related options. (PR #73845)

2023-12-02 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/73845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix documentation on PGO/coverage related options. (PR #73845)

2023-12-01 Thread Petr Hosek via cfe-commits


@@ -4401,13 +4413,18 @@ Execute ``clang-cl /?`` to see a list of supported 
options:
   Instrument only functions from files where names 
don't match all the regexes separated by a semi-colon
   -fprofile-filter-files=
   Instrument only functions from files where names 
match any regex separated by a semi-colon
+  -fprofile-generate[=]

petrhosek wrote:

This is really surprising but I just tested this and you're correct. Do you 
know why that's the case, that is why `-fprofile-generate=` and 
`-fprofile-instr-generate=` have a different behavior?

https://github.com/llvm/llvm-project/pull/73845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix documentation on PGO/coverage related options. (PR #73845)

2023-12-01 Thread Petr Hosek via cfe-commits


@@ -4401,13 +4415,21 @@ Execute ``clang-cl /?`` to see a list of supported 
options:
   Instrument only functions from files where names 
don't match all the regexes separated by a semi-colon
   -fprofile-filter-files=
   Instrument only functions from files where names 
match any regex separated by a semi-colon
-  -fprofile-instr-generate=
-  Generate instrumented code to collect execution 
counts into 
+  -fprofile-generate=
+  Generate instrumented code to collect execution 
counts into a raw profile file in the directory specified by the argument. The 
filename uses the %m format. See :ref:`Profiling With Instrumentation 
`  section for details.
+  (overridden by LLVM_PROFILE_FILE env var)
+  -fprofile-generate
+  Generate instrumented code to collect execution 
counts into default_%m.profraw file
+  (overridden by '=' form of option or 
LLVM_PROFILE_FILE env var)
+  -fprofile-instr-generate=

petrhosek wrote:

Can you also add `-fprofile-instr-generate` case below for consistency?

https://github.com/llvm/llvm-project/pull/73845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix documentation on PGO/coverage related options. (PR #73845)

2023-12-01 Thread Petr Hosek via cfe-commits


@@ -4401,13 +4415,21 @@ Execute ``clang-cl /?`` to see a list of supported 
options:
   Instrument only functions from files where names 
don't match all the regexes separated by a semi-colon
   -fprofile-filter-files=
   Instrument only functions from files where names 
match any regex separated by a semi-colon
-  -fprofile-instr-generate=
-  Generate instrumented code to collect execution 
counts into 
+  -fprofile-generate=
+  Generate instrumented code to collect execution 
counts into a raw profile file in the directory specified by the argument. The 
filename uses the %m format. See :ref:`Profiling With Instrumentation 
`  section for details.

petrhosek wrote:

Should the second sentence say "The filename uses the default_%m.profraw."?

https://github.com/llvm/llvm-project/pull/73845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-11-30 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/69447
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-11-30 Thread Petr Hosek via cfe-commits


@@ -138,10 +164,34 @@ static const VersionTuple MultilibVersionCurrent(1, 0);
 struct MultilibSerialization {
   std::string Dir;
   std::vector Flags;
+  std::string Group;
+};
+
+struct MultilibGroupSerialization {
+  /*
+   * Future directions:
+   *
+   * If it's needed in future, we could introduce additional group types by
+   * permitting Type to contain strings other than "Exclusive". Another
+   * possibility is a group of library directories that are mutually
+   * _dependent_ rather than mutually exclusive: if you include one you must
+   * include them all.
+   *
+   * It might also be useful to allow groups to be members of other groups, so
+   * that a mutually exclusive group could contain a mutually dependent set of
+   * library directories, or vice versa.
+   *
+   * These additional features would need changes in the implementation, but
+   * the YAML schema is set up so they can be added without requiring changes
+   * in existing users' multilib.yaml files.
+   */
+  std::string Name;
+  std::string Type;

petrhosek wrote:

Could we make the type an `enum`?

https://github.com/llvm/llvm-project/pull/69447
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[libcxx] [libc] [clang-tools-extra] [clang] [llvm] [mlir] [compiler-rt] [flang] [sanitizer_symbolizer] RenderContextual elements for symbolizer markup. (PR #73194)

2023-11-30 Thread Petr Hosek via cfe-commits
=?utf-8?q?Andr=C3=A9s?= Villegas ,
=?utf-8?q?Andr=C3=A9s?= Villegas 
Message-ID:
In-Reply-To: 


https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/73194
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix documentation on PGO/coverage related options. (PR #73845)

2023-11-30 Thread Petr Hosek via cfe-commits


@@ -4401,13 +4413,18 @@ Execute ``clang-cl /?`` to see a list of supported 
options:
   Instrument only functions from files where names 
don't match all the regexes separated by a semi-colon
   -fprofile-filter-files=
   Instrument only functions from files where names 
match any regex separated by a semi-colon
+  -fprofile-generate[=]
+  Generate instrumented code to collect execution 
counts into a raw profile file in 
+  (overridden by LLVM_PROFILE_FILE env var)
   -fprofile-instr-generate=
   Generate instrumented code to collect execution 
counts into 
   (overridden by LLVM_PROFILE_FILE env var)
   -fprofile-instr-generate
   Generate instrumented code to collect execution 
counts into default.profraw file
   (overridden by '=' form of option or 
LLVM_PROFILE_FILE env var)
   -fprofile-instr-use=
+  Use instrumentation data for coverage testing or 
profile-guided optimization
+  -fprofile--use=

petrhosek wrote:

This a nit, but there should be only a single `-`, so `-fprofile-use` not 
`-fprofile--use`.

https://github.com/llvm/llvm-project/pull/73845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix documentation on PGO/coverage related options. (PR #73845)

2023-11-30 Thread Petr Hosek via cfe-commits


@@ -4401,13 +4413,18 @@ Execute ``clang-cl /?`` to see a list of supported 
options:
   Instrument only functions from files where names 
don't match all the regexes separated by a semi-colon
   -fprofile-filter-files=
   Instrument only functions from files where names 
match any regex separated by a semi-colon
+  -fprofile-generate[=]
+  Generate instrumented code to collect execution 
counts into a raw profile file in 
+  (overridden by LLVM_PROFILE_FILE env var)
   -fprofile-instr-generate=

petrhosek wrote:

Can we also update this line to match `-fprofile-generate`?

https://github.com/llvm/llvm-project/pull/73845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] Fix documentation on PGO/coverage related options. (PR #73845)

2023-11-30 Thread Petr Hosek via cfe-commits


@@ -4401,13 +4413,18 @@ Execute ``clang-cl /?`` to see a list of supported 
options:
   Instrument only functions from files where names 
don't match all the regexes separated by a semi-colon
   -fprofile-filter-files=
   Instrument only functions from files where names 
match any regex separated by a semi-colon
+  -fprofile-generate[=]

petrhosek wrote:

Rather than ``, I think it'd be better to say `` and point to 
https://clang.llvm.org/docs/UsersManual.html#profiling-with-instrumentation for 
more details.

https://github.com/llvm/llvm-project/pull/73845
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Fuchsia] Explicitly set C++ standard C++23 in libcxx tests (PR #73760)

2023-11-29 Thread Petr Hosek via cfe-commits


@@ -136,6 +136,7 @@ if(WIN32 OR LLVM_WINSYSROOT)
   set(RUNTIMES_${target}_CMAKE_EXE_LINKER_FLAGS ${WINDOWS_LINK_FLAGS} CACHE 
STRING "")
   set(RUNTIMES_${target}_CMAKE_SHARED_LINKER_FLAGS ${WINDOWS_LINK_FLAGS} CACHE 
STRING "")
   set(RUNTIMES_${target}_CMAKE_MODULE_LINKER_FLAGS ${WINDOWS_LINK_FLAGS} CACHE 
STRING "")
+  set(RUNTIMES_${target}_LIBCXX_TEST_PARAMS "std=c++23" CACHE STRING "")

petrhosek wrote:

This is just a nit, but can you move this next to the other `*_LIBCXX_*` flags 
in this block?

https://github.com/llvm/llvm-project/pull/73760
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Fuchsia] Explicitly set C++ standard C++23 in libcxx tests (PR #73760)

2023-11-29 Thread Petr Hosek via cfe-commits


@@ -28,6 +28,7 @@ set(LLVM_STATIC_LINK_CXX_STDLIB ON CACHE BOOL "")
 set(LLVM_USE_RELATIVE_PATHS_IN_FILES ON CACHE BOOL "")
 set(LLDB_ENABLE_CURSES OFF CACHE BOOL "")
 set(LLDB_ENABLE_LIBEDIT OFF CACHE BOOL "")
+set(LIBCXX_TEST_PARAMS "std=c++23" CACHE STRING "")

petrhosek wrote:

This needs to be set separately for all targets, i.e. 
`RUNTIMES_${target}_LIBCXX_TEST_PARAMS`, `LIBCXX_TEST_PARAMS` should be only 
set for Darwin.

https://github.com/llvm/llvm-project/pull/73760
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [lldb] Reland "[clang][DebugInfo] Emit global variable definitions for static data members with constant initializers" (PR #71780)

2023-11-27 Thread Petr Hosek via cfe-commits

petrhosek wrote:

Can we add back the constant to the declaration? It's been a week and the 
progress on #72730 seems to have stalled while our builders are still broken.

https://github.com/llvm/llvm-project/pull/71780
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[llvm] [libcxx] [clang] [compiler-rt] fix python SyntaxWarnings in check-all output (PR #72538)

2023-11-16 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/72538
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-11-14 Thread Petr Hosek via cfe-commits

petrhosek wrote:

> Would you accept `Type: Exclusive` instead of `Exclusive: True`? It seems 
> more plausible to me that there might be three kinds of group that _can't_ go 
> together than three group-type flags that you can have in any combination.

I like this as it scales better to other types of groups we might have in the 
future.

https://github.com/llvm/llvm-project/pull/69447
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang] Only build static analyzer sources if requested (PR #71653)

2023-11-14 Thread Petr Hosek via cfe-commits


@@ -23,7 +23,9 @@ add_subdirectory(Tooling)
 add_subdirectory(DirectoryWatcher)
 add_subdirectory(Index)
 add_subdirectory(IndexSerialization)
-add_subdirectory(StaticAnalyzer)
+if(CLANG_ENABLE_STATIC_ANALYZER)

petrhosek wrote:

I agree with @llvm-beanz but I'd propose going even further and removing this 
option altogether. Rather than having separate `CLANG_ENABLE_` options 
for each tool which doesn't scale very well, we should encourage developers to 
use `LLVM_DISTRIBUTION_COMPONENTS` to control which tools to build.

https://github.com/llvm/llvm-project/pull/71653
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Driver] Add ExclusiveGroup feature to multilib.yaml. (PR #69447)

2023-11-13 Thread Petr Hosek via cfe-commits

petrhosek wrote:

I'm fine with the feature, my only concern is to make sure we don't 
unintentionally make it harder to integrate potential future extensions such as 
the mutually dependent groups.

The only alternative I could come up with is representing groups as first class 
concept with properties, such as being mutually exclusive. To give a concrete 
example:

```
Groups:
- Name: actually_exclude_something
  Exclusive: True

Variants:
- Dir: testdir1_non_exclusive
  Flags: [--target=thumbv7m-none-unknown-eabi]

- Dir: testdir2_non_exclusive
  Flags: [--target=thumbv7em-none-unknown-eabi]

- Dir: testdir1_exclusive
  Flags: [--target=thumbv7m-none-unknown-eabi]
  Group: actually_exclude_something

- Dir: testdir2_exclusive
  Flags: [--target=thumbv7em-none-unknown-eabi]
  Group: actually_exclude_something
```

This makes it possible to extend the group concept in the future but it's a 
little more verbose since you need to define the group first, although that may 
not necessarily be a bad thing since you could also warn if someone 
accidentally tries to use a group that wasn't previously defined (e.g. when 
making a typo).

https://github.com/llvm/llvm-project/pull/69447
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [clang] Remove fixed point arithmetic error (PR #71884)

2023-11-13 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek approved this pull request.


https://github.com/llvm/llvm-project/pull/71884
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[compiler-rt] [llvm] [clang] [Profile] Refactor profile correlation. (PR #70856)

2023-11-08 Thread Petr Hosek via cfe-commits

petrhosek wrote:

> > What I think would be a better design is to just omit the respective 
> > sections altogether when -debug-info-correlate/-profile-correlate= is 
> > enabled.
> 
> I don't understand how this solves the problem you described above. Can you 
> elaborate a bit more? We still need to decide if we need to omit data and 
> names sections at runtime right?

If you omit the data and names sections from the object files, then 
`__llvm_profile_end_data() - __llvm_profile_begin_data()` and 
`__llvm_profile_end_names() - __llvm_profile_begin_names()` are both `0` and 
there's no need for [special casing this in the 
runtime](https://github.com/llvm/llvm-project/blob/24b11ba24da3e65f718391ccc85d4d22a081e893/compiler-rt/lib/profile/InstrProfilingBuffer.c#L59).
 When linking together objects complied with different flags, sizes of those 
sections would correspond only to object files compiled without correlation. 
For example, if linking together `a.o` compiled with debug info correlation and 
`b.o` compiled without, the profile would only contain data and names from 
`b.o`.

This approach would require slightly more complex logic in the correlator. 
Currently, we either read the data and names from the profile or from DWARF 
(depending on the flag), there's no in-between state. With the approach I'm 
proposing, we would need to combine data from different sources: read the data 
and names in the profile and combine them with the data and names in the DWARF 
and/or the unstripped file.

https://github.com/llvm/llvm-project/pull/70856
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] c6a198c - [CMake][Fuchsia] Use unchecked hardening mode for libc++

2023-11-06 Thread Petr Hosek via cfe-commits

Author: Petr Hosek
Date: 2023-11-06T22:37:49Z
New Revision: c6a198c72ab0bae4bc8c322ce84feb691c190e5d

URL: 
https://github.com/llvm/llvm-project/commit/c6a198c72ab0bae4bc8c322ce84feb691c190e5d
DIFF: 
https://github.com/llvm/llvm-project/commit/c6a198c72ab0bae4bc8c322ce84feb691c190e5d.diff

LOG: [CMake][Fuchsia] Use unchecked hardening mode for libc++

We set LLVM_ENABLE_ASSERTIONS in some builds which is now translated
to LIBCXX_HARDENING_MODE=safe, but our codebase is not yet clean and
we're getting assertion failures.

Added: 


Modified: 
clang/cmake/caches/Fuchsia-stage2.cmake
clang/cmake/caches/Fuchsia.cmake

Removed: 




diff  --git a/clang/cmake/caches/Fuchsia-stage2.cmake 
b/clang/cmake/caches/Fuchsia-stage2.cmake
index 13bb5ad3546e98f..a4d2926559eee7f 100644
--- a/clang/cmake/caches/Fuchsia-stage2.cmake
+++ b/clang/cmake/caches/Fuchsia-stage2.cmake
@@ -81,6 +81,7 @@ if(APPLE)
   set(LIBCXX_ABI_VERSION 2 CACHE STRING "")
   set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
   set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
+  set(LIBCXX_HARDENING_MODE "unchecked" CACHE STRING "")
   set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
   set(RUNTIMES_CMAKE_ARGS 
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13;-DCMAKE_OSX_ARCHITECTURES=arm64|x86_64" 
CACHE STRING "")
 endif()

diff  --git a/clang/cmake/caches/Fuchsia.cmake 
b/clang/cmake/caches/Fuchsia.cmake
index 0230bb056a4f0a1..4c9cd12101d478a 100644
--- a/clang/cmake/caches/Fuchsia.cmake
+++ b/clang/cmake/caches/Fuchsia.cmake
@@ -116,6 +116,7 @@ else()
   set(LIBCXX_ABI_VERSION 2 CACHE STRING "")
   set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
   set(LIBCXX_ENABLE_STATIC_ABI_LIBRARY ON CACHE BOOL "")
+  set(LIBCXX_HARDENING_MODE "unchecked" CACHE STRING "")
   set(LIBCXX_USE_COMPILER_RT ON CACHE BOOL "")
   set(LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" CACHE 
STRING "")
   set(RUNTIMES_CMAKE_ARGS 
"-DCMAKE_OSX_DEPLOYMENT_TARGET=10.13;-DCMAKE_OSX_ARCHITECTURES=arm64|x86_64" 
CACHE STRING "")



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options (PR #69133)

2023-11-06 Thread Petr Hosek via cfe-commits


@@ -850,23 +850,38 @@ if (CLANG_ENABLE_BOOTSTRAP)
   endforeach()
 endif()
 
-if (CLANG_BOLT_INSTRUMENT AND NOT LLVM_BUILD_INSTRUMENTED)
+set(CLANG_BOLT "INSTRUMENT" CACHE STRING "Apply BOLT optimization to Clang. \
+  May be specified as Instrument or Perf or LBR to use a particular profiling \
+  mechanism.")
+string(TOUPPER "${CLANG_BOLT}" uppercase_CLANG_BOLT)

petrhosek wrote:

This is a super minor nit, but you can reuse the same variable (it wouldn't 
actually change the cached value, the non-cached variable is going to shadow 
the cached one which is fine in this case).

https://github.com/llvm/llvm-project/pull/69133
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options (PR #69133)

2023-11-06 Thread Petr Hosek via cfe-commits


@@ -67,6 +67,67 @@ def merge_fdata(args):
 return 0
 
 
+def perf(args):
+parser = argparse.ArgumentParser(
+prog="perf-helper perf", description="perf wrapper for BOLT profile 
collection"
+)
+parser.add_argument(
+"--lbr", action="store_true", help="Use perf with branch stacks"
+)
+parser.add_argument("cmd", nargs="*", help="")
+
+# Use python's arg parser to handle all leading option arguments, but pass
+# everything else through to perf
+first_cmd = next(arg for arg in args if not arg.startswith("--"))

petrhosek wrote:

You can use `parser.add_argument('cmd', nargs=argparse.REMAINDER)` to let 
`argparse` handle this for you.

https://github.com/llvm/llvm-project/pull/69133
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options (PR #69133)

2023-11-06 Thread Petr Hosek via cfe-commits

https://github.com/petrhosek edited 
https://github.com/llvm/llvm-project/pull/69133
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [Clang][CMake] Support perf, LBR, and Instrument CLANG_BOLT options (PR #69133)

2023-11-06 Thread Petr Hosek via cfe-commits


@@ -6,15 +6,52 @@ import lit.util
 import os
 import subprocess
 
-config.clang = os.path.realpath(lit.util.which('clang-bolt.inst', 
config.clang_tools_dir)).replace('\\', '/')
+clang_binary = "clang"
+perf_wrapper = ""
+if config.clang_bolt_mode.lower() == "instrument":
+clang_binary = config.clang_bolt_name
+else:  # perf or LBR
+perf_wrapper = "%s %s/perf-helper.py perf" % (

petrhosek wrote:

Please use Python f-string.

https://github.com/llvm/llvm-project/pull/69133
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] 71a4389 - [CMake][Fuchsia] Set the runtimes for the second stage

2023-11-06 Thread Petr Hosek via cfe-commits

Author: Petr Hosek
Date: 2023-11-06T08:32:59Z
New Revision: 71a43897d42c5e27f9fde1c3451c529c44dd337b

URL: 
https://github.com/llvm/llvm-project/commit/71a43897d42c5e27f9fde1c3451c529c44dd337b
DIFF: 
https://github.com/llvm/llvm-project/commit/71a43897d42c5e27f9fde1c3451c529c44dd337b.diff

LOG: [CMake][Fuchsia] Set the runtimes for the second stage

This is a temporary workaround until we figure out the right solution.

Added: 


Modified: 
clang/cmake/caches/Fuchsia.cmake

Removed: 




diff  --git a/clang/cmake/caches/Fuchsia.cmake 
b/clang/cmake/caches/Fuchsia.cmake
index 9c68be0bfe54b69..0230bb056a4f0a1 100644
--- a/clang/cmake/caches/Fuchsia.cmake
+++ b/clang/cmake/caches/Fuchsia.cmake
@@ -197,6 +197,9 @@ foreach(variableName ${variableNames})
   endif()
 endforeach()
 
+# TODO: This is a temporary workaround until we figure out the right solution.
+set(BOOTSTRAP_LLVM_ENABLE_RUNTIMES "compiler-rt;libcxx;libcxxabi;libunwind" 
CACHE STRING "")
+
 # Setup the bootstrap build.
 set(CLANG_ENABLE_BOOTSTRAP ON CACHE BOOL "")
 set(CLANG_BOOTSTRAP_EXTRA_DEPS



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[llvm] [clang] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Petr Hosek via cfe-commits

petrhosek wrote:

I'm a bit concerned about the use of `hasCorrelation`. We require the runtime 
to check the flag and omit the data and names section if set which introduces a 
potential issue: since we emit the version in every TU and u se COMDAT to 
deduplicate them, but that means that if you link together TUs compiled with 
and without `-debug-info-correlate`/`-profile-correlate=` (that is having 
different flags), you would end up with different results depending on which 
section was selected by the linker. This may not be an issue if you always 
compile all code yourself using the same set of flags, but might be an issue 
when you combine libraries coming from different sources.

What I think would be a better design is to just omit the respective sections 
altogether when `-debug-info-correlate`/`-profile-correlate=` is enabled. Then 
in `llvm-profdata` we would use the correlation as a fallback mechanism, that 
is if the data or names are present in the profile, just use it, otherwise 
fallback either to debug info or unstripped file (you could even support a 
combination of both). That way we wouldn't even need flags like 
`VARIANT_MASK_DBG_CORRELATE`. 

https://github.com/llvm/llvm-project/pull/70856
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


  1   2   3   4   5   6   7   >