[clang] [Clang] Introduce 'clang-nvlink-wrapper' to work around 'nvlink' (PR #96561)

2024-07-22 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@jhuber6 ,
there is still few failed bot because of these changes
* https://lab.llvm.org/buildbot/#/builders/193/builds/1224
* https://lab.llvm.org/buildbot/#/builders/2/builds/2790

would you fix the problem or revert the changes?


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


[clang] [CMake] Update CMake cache file for the ARM/Aarch64 cross toolchain builds. NFC. (PR #94835)

2024-06-07 Thread Vladimir Vereschaka via cfe-commits

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


[clang] [CMake] Update CMake cache file for the ARM/Aarch64 cross toolchain builds. NFC. (PR #94835)

2024-06-07 Thread Vladimir Vereschaka via cfe-commits

https://github.com/vvereschaka updated 
https://github.com/llvm/llvm-project/pull/94835

>From 4135be7d1e1ca702324bd8a80c20acc034b18ecb Mon Sep 17 00:00:00 2001
From: Vladimir Vereschaka 
Date: Fri, 7 Jun 2024 20:58:10 -0700
Subject: [PATCH] [CMake] Update CMake cache file for the ARM/Aarch64 cross
 toolchain builds. NFC.

* generate Clang configuration file with provided target sysroot 
(TOOLCHAIN_TARGET_SYSROOTFS)
* explicitly pass provided target sysroot into the compiler-rt tests 
configuration.
* added ability to configure a type of the build libraries -- shared or static
  (TOOLCHAIN_SHARED_LIBS, default OFF)
---
 clang/cmake/caches/CrossWinToARMLinux.cmake | 45 ++---
 1 file changed, 31 insertions(+), 14 deletions(-)

diff --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index 6826d01f8b2a7..e4d0a0c2d14cb 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -6,21 +6,23 @@
 # on Windows platform.
 #
 # NOTE: the build requires a development ARM Linux root filesystem to use
-# proper target platform depended library and header files:
-#  - create  directory and put the clang 
configuration
-#file named .cfg into it.
-#  - add the `--sysroot=` argument into
-#this configuration file.
-#  - add other necessary target depended clang arguments there, 
-#such as '-mcpu=cortex-a78' & etc.
+# proper target platform depended library and header files.
+#
+# The build generates a proper clang configuration file with stored
+# --sysroot argument for specified target triple. Also it is possible
+# to specify configuration path via CMake arguments, such as
+#   -DCLANG_CONFIG_FILE_USER_DIR=
+# and/or
+#   -DCLANG_CONFIG_FILE_SYSTEM_DIR=
 #
 # See more details here: 
https://clang.llvm.org/docs/UsersManual.html#configuration-files
 #
 # Configure:
 #  cmake -G Ninja ^
 #   -DTOOLCHAIN_TARGET_TRIPLE=aarch64-unknown-linux-gnu ^
+#   -DTOOLCHAIN_TARGET_SYSROOTFS= ^
+#   -DTOOLCHAIN_SHARED_LIBS=OFF ^ 
 #   -DCMAKE_INSTALL_PREFIX=../install ^
-#   -DCLANG_CONFIG_FILE_USER_DIR= ^
 #   -DCMAKE_CXX_FLAGS="-D__OPTIMIZE__" ^
 #   -DREMOTE_TEST_HOST="" ^
 #   -DREMOTE_TEST_USER="" ^
@@ -81,6 +83,20 @@ endif()
 
 message(STATUS "Toolchain target triple: ${TOOLCHAIN_TARGET_TRIPLE}")
 
+if (DEFINED TOOLCHAIN_TARGET_SYSROOTFS)
+  message(STATUS "Toolchain target sysroot: ${TOOLCHAIN_TARGET_SYSROOTFS}")
+  # Store the --sysroot argument for the compiler-rt test flags.
+  set(sysroot_flags --sysroot='${TOOLCHAIN_TARGET_SYSROOTFS}')
+  # Generate the clang configuration file for the specified target triple
+  # and store --sysroot in this file.
+  file(WRITE "${CMAKE_BINARY_DIR}/bin/${TOOLCHAIN_TARGET_TRIPLE}.cfg" 
${sysroot_flags})
+endif()
+
+# Build the shared libraries for libc++/libc++abi/libunwind.
+if (NOT DEFINED TOOLCHAIN_SHARED_LIBS)
+  set(TOOLCHAIN_SHARED_LIBS OFF)
+endif()
+ 
 if (NOT DEFINED LLVM_TARGETS_TO_BUILD)
   if ("${TOOLCHAIN_TARGET_TRIPLE}" MATCHES "^(armv|arm32)+")
 set(LLVM_TARGETS_TO_BUILD "ARM" CACHE STRING "")
@@ -183,20 +199,21 @@ 
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_COMPILER_RT_CAN_EXECUTE_TESTS
 
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_COMPILER_RT_USE_BUILTINS_LIBRARY   
   ON CACHE BOOL "")
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_COMPILER_RT_CXX_LIBRARY
   libcxx CACHE STRING "")
-# Tell Clang to seach C++ headers alongside with the just-built binaries for 
the C++ compiler-rt tests.
-set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_COMPILER_RT_TEST_COMPILER_CFLAGS   
   "--stdlib=libc++" CACHE STRING "")
-
+# The compiler-rt tests disable the clang configuration files during the 
execution by setting CLANG_NO_DEFAULT_CONFIG=1
+# and drops out the --sysroot from there. Provide it explicity via the test 
flags here if target sysroot has been specified.
+set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_COMPILER_RT_TEST_COMPILER_CFLAGS   
   "--stdlib=libc++ ${sysroot_flags}" CACHE STRING "")
+  
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_USE_COMPILER_RT  
   ON CACHE BOOL "")
-set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_ENABLE_SHARED
   OFF CACHE BOOL "")
+set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_ENABLE_SHARED
   ${TOOLCHAIN_SHARED_LIBS} CACHE BOOL "")
 
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_USE_LLVM_UNWINDER
   ON CACHE BOOL "")
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_ENABLE_STATIC_UNWINDER   
   ON CACHE BOOL "")
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_USE_COMPILER_RT  
   ON CACHE BOOL "")
 
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS 
  OFF CACHE BOOL "")
-set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_ENABLE_SHARED
   OFF CACHE BOOL "")
+set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_ENABLE_SHARED
   

[clang] [CMake] Update CMake cache file for the ARM/Aarch64 cross toolchain builds. NFC. (PR #94835)

2024-06-07 Thread Vladimir Vereschaka via cfe-commits

https://github.com/vvereschaka created 
https://github.com/llvm/llvm-project/pull/94835

* generate Clang configuration file with provided target sysroot 
(TOOLCHAIN_TARGET_SYSROOTFS)
* explicitly pass provided target sysroot into the compiler-rt tests 
configuration.
* added ability to configure a type of the build libraries -- shared or static 
(TOOLCHAIN_SHARED_LIBS, default OFF)

In behalf of: #94284

>From 929abc43dae5af66d3f45b36eef84780ff7effae Mon Sep 17 00:00:00 2001
From: Vladimir Vereschaka 
Date: Fri, 7 Jun 2024 20:58:10 -0700
Subject: [PATCH] [CMake] Update CMake cache file for the ARM/Aarch64 cross
 toolchain builds. NFC.

* generate Clang configuration file with provided target sysroot 
(TOOLCHAIN_TARGET_SYSROOTFS)
* explicity pass provided target sysroot into the compiler-rt tests 
configuration.
* added ability to configure a type of the build libraries -- sharead or static
  (TOOLCHAIN_SHARED_LIBS, default OFF)
---
 clang/cmake/caches/CrossWinToARMLinux.cmake | 45 ++---
 1 file changed, 31 insertions(+), 14 deletions(-)

diff --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index 6826d01f8b2a7..e4d0a0c2d14cb 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -6,21 +6,23 @@
 # on Windows platform.
 #
 # NOTE: the build requires a development ARM Linux root filesystem to use
-# proper target platform depended library and header files:
-#  - create  directory and put the clang 
configuration
-#file named .cfg into it.
-#  - add the `--sysroot=` argument into
-#this configuration file.
-#  - add other necessary target depended clang arguments there, 
-#such as '-mcpu=cortex-a78' & etc.
+# proper target platform depended library and header files.
+#
+# The build generates a proper clang configuration file with stored
+# --sysroot argument for specified target triple. Also it is possible
+# to specify configuration path via CMake arguments, such as
+#   -DCLANG_CONFIG_FILE_USER_DIR=
+# and/or
+#   -DCLANG_CONFIG_FILE_SYSTEM_DIR=
 #
 # See more details here: 
https://clang.llvm.org/docs/UsersManual.html#configuration-files
 #
 # Configure:
 #  cmake -G Ninja ^
 #   -DTOOLCHAIN_TARGET_TRIPLE=aarch64-unknown-linux-gnu ^
+#   -DTOOLCHAIN_TARGET_SYSROOTFS= ^
+#   -DTOOLCHAIN_SHARED_LIBS=OFF ^ 
 #   -DCMAKE_INSTALL_PREFIX=../install ^
-#   -DCLANG_CONFIG_FILE_USER_DIR= ^
 #   -DCMAKE_CXX_FLAGS="-D__OPTIMIZE__" ^
 #   -DREMOTE_TEST_HOST="" ^
 #   -DREMOTE_TEST_USER="" ^
@@ -81,6 +83,20 @@ endif()
 
 message(STATUS "Toolchain target triple: ${TOOLCHAIN_TARGET_TRIPLE}")
 
+if (DEFINED TOOLCHAIN_TARGET_SYSROOTFS)
+  message(STATUS "Toolchain target sysroot: ${TOOLCHAIN_TARGET_SYSROOTFS}")
+  # Store the --sysroot argument for the compiler-rt test flags.
+  set(sysroot_flags --sysroot='${TOOLCHAIN_TARGET_SYSROOTFS}')
+  # Generate the clang configuration file for the specified target triple
+  # and store --sysroot in this file.
+  file(WRITE "${CMAKE_BINARY_DIR}/bin/${TOOLCHAIN_TARGET_TRIPLE}.cfg" 
${sysroot_flags})
+endif()
+
+# Build the shared libraries for libc++/libc++abi/libunwind.
+if (NOT DEFINED TOOLCHAIN_SHARED_LIBS)
+  set(TOOLCHAIN_SHARED_LIBS OFF)
+endif()
+ 
 if (NOT DEFINED LLVM_TARGETS_TO_BUILD)
   if ("${TOOLCHAIN_TARGET_TRIPLE}" MATCHES "^(armv|arm32)+")
 set(LLVM_TARGETS_TO_BUILD "ARM" CACHE STRING "")
@@ -183,20 +199,21 @@ 
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_COMPILER_RT_CAN_EXECUTE_TESTS
 
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_COMPILER_RT_USE_BUILTINS_LIBRARY   
   ON CACHE BOOL "")
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_COMPILER_RT_CXX_LIBRARY
   libcxx CACHE STRING "")
-# Tell Clang to seach C++ headers alongside with the just-built binaries for 
the C++ compiler-rt tests.
-set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_COMPILER_RT_TEST_COMPILER_CFLAGS   
   "--stdlib=libc++" CACHE STRING "")
-
+# The compiler-rt tests disable the clang configuration files during the 
execution by setting CLANG_NO_DEFAULT_CONFIG=1
+# and drops out the --sysroot from there. Provide it explicity via the test 
flags here if target sysroot has been specified.
+set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_COMPILER_RT_TEST_COMPILER_CFLAGS   
   "--stdlib=libc++ ${sysroot_flags}" CACHE STRING "")
+  
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_USE_COMPILER_RT  
   ON CACHE BOOL "")
-set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_ENABLE_SHARED
   OFF CACHE BOOL "")
+set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_ENABLE_SHARED
   ${TOOLCHAIN_SHARED_LIBS} CACHE BOOL "")
 
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_USE_LLVM_UNWINDER
   ON CACHE BOOL "")
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_ENABLE_STATIC_UNWINDER   
   ON CACHE BOOL "")
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_USE_COMPILER_RT  
   

[clang] [CMake] Remove supporting of DEFAULT_SYSROOT for the ARM/Aarch64 cross builds. NFC. (PR #94300)

2024-06-04 Thread Vladimir Vereschaka via cfe-commits

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


[clang] [CMake] Remove supporting of DEFAULT_SYSROOT for the ARM/Aarch64 cross builds. NFC. (PR #94300)

2024-06-03 Thread Vladimir Vereschaka via cfe-commits

https://github.com/vvereschaka created 
https://github.com/llvm/llvm-project/pull/94300

Avoid usage DEFAULT_SYSROOT CMake variable to confgiure the ARM/Aarch64 cross 
platform toolchain builds. Use the Clang configuration files with proper 
`--sysroot=` in it instead.

More details could be found here:
https://github.com/llvm/llvm-project/issues/94284

>From 41bb5a161157fe22ef31cdd078746944cb4b33b9 Mon Sep 17 00:00:00 2001
From: Vladimir Vereschaka 
Date: Mon, 3 Jun 2024 17:59:34 -0700
Subject: [PATCH] [CMake] Remove supporting of DEFAULT_SYSROOT for the
 ARM/Aarch64 cross builds. NFC.

Avoid usage DEFAULT_SYSROOT Cmake variable to confgiure the ARM/Aarch64 cross
platform toolchain builds. Use the Clang configuration files with proper
`--sysroot=` in it instead.

More details could be found here:
https://github.com/llvm/llvm-project/issues/94284
---
 clang/cmake/caches/CrossWinToARMLinux.cmake | 21 +++--
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index 62e87c6c62f85..6826d01f8b2a7 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -6,14 +6,21 @@
 # on Windows platform.
 #
 # NOTE: the build requires a development ARM Linux root filesystem to use
-# proper target platform depended library and header files.
+# proper target platform depended library and header files:
+#  - create  directory and put the clang 
configuration
+#file named .cfg into it.
+#  - add the `--sysroot=` argument into
+#this configuration file.
+#  - add other necessary target depended clang arguments there, 
+#such as '-mcpu=cortex-a78' & etc.
+#
+# See more details here: 
https://clang.llvm.org/docs/UsersManual.html#configuration-files
 #
 # Configure:
 #  cmake -G Ninja ^
-#   -DTOOLCHAIN_TARGET_TRIPLE=armv7-unknown-linux-gnueabihf ^
+#   -DTOOLCHAIN_TARGET_TRIPLE=aarch64-unknown-linux-gnu ^
 #   -DCMAKE_INSTALL_PREFIX=../install ^
-#   -DDEFAULT_SYSROOT= ^
-#   -DLLVM_AR=/bin/llvm-ar[.exe] ^
+#   -DCLANG_CONFIG_FILE_USER_DIR= ^
 #   -DCMAKE_CXX_FLAGS="-D__OPTIMIZE__" ^
 #   -DREMOTE_TEST_HOST="" ^
 #   -DREMOTE_TEST_USER="" ^
@@ -43,10 +50,6 @@ get_filename_component(LLVM_PROJECT_DIR
"${CMAKE_CURRENT_LIST_DIR}/../../../"
ABSOLUTE)
 
-if (NOT DEFINED DEFAULT_SYSROOT)
-  message(WARNING "DEFAULT_SYSROOT must be specified for the cross toolchain 
build.")
-endif()
-
 if (NOT DEFINED LLVM_ENABLE_ASSERTIONS)
   set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
 endif()
@@ -136,7 +139,6 @@ endif()
 set(LLVM_BUILTIN_TARGETS"${TOOLCHAIN_TARGET_TRIPLE}" CACHE 
STRING "")
 
 set(BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_SYSTEM_NAME  
   "Linux" CACHE STRING "")
-set(BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_SYSROOT  
   "${DEFAULT_SYSROOT}"  CACHE STRING "")
 set(BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_INSTALL_RPATH
   "${RUNTIMES_INSTALL_RPATH}"  CACHE STRING "")
 set(BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_BUILD_WITH_INSTALL_RPATH 
   ON  CACHE BOOL "")
 set(BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_LLVM_CMAKE_DIR 
   "${LLVM_PROJECT_DIR}/llvm/cmake/modules" CACHE PATH "")
@@ -156,7 +158,6 @@ set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR  ON CACHE BOOL 
"")
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LLVM_ENABLE_RUNTIMES   
   "${LLVM_ENABLE_RUNTIMES}" CACHE STRING "")
 
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_SYSTEM_NAME  
   "Linux" CACHE STRING "")
-set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_SYSROOT  
   "${DEFAULT_SYSROOT}"  CACHE STRING "")
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_INSTALL_RPATH
   "${RUNTIMES_INSTALL_RPATH}"  CACHE STRING "")
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_BUILD_WITH_INSTALL_RPATH 
   ON  CACHE BOOL "")
 

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


[clang] [Driver] Remove a bunch of unnecessary REQUIRES constraints (PR #94055)

2024-06-03 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

>I think requiring all driver tests pass with a custom DEFAULT_SYSROOT is an 
>undue burden.
>Do you know why llvm-zorg/buildbot/osuosl/master/config/builders.py 
>llvm-clang-win-x-aarch64 needs to set DEFAULT_SYSROOT?
This is the arm toolchain builders. They build a whole toolchain including the 
libc++/libc++abi/libunwind libraries for the Arm targets. Also they build the 
library tests for the target ARM platform. All of those requires the target's 
sysroot (Arm/Aarch64 Ubuntu Linux in these cases) to build the executables. To 
avoid passing --sysroot through a bunch of CMake variables for the libraries 
and their tests the DEFAULT_SYSROOT cmake var was used (it was defined for that 
cases as far as I understood).


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


[clang] [Driver] Remove a bunch of unnecessary REQUIRES constraints (PR #94055)

2024-06-03 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@MaskRay 
>// UNSUPPORTED: system-windows was a fairly reasonable workaround, after the 
>previously imprecise // REQUIRES: x86-registered-target had been removed.
I'm not quite agree here, sorry. That kind of workarounds disable the tests for 
the cross platform builders on the Windows build hosts, but they could need 
that kind of test even more than the other build hosts on my sight. Sure, this 
test didn't work for Arm/aarch64 builders before and this workaround does not 
change anything for them, but this should not be like that I suppose.

> (It seems that there is an arm/aarch64 window bot that does not enable x86 
> targets.)
Correct. These bots enable only Arm/Aarch64 targets.

> #94276 seems to fix the test properly.
yes, it fixes `clang/test/Driver/sysroot.c` test

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


[clang] [Driver] Fix the sysroot.c test properly (PR #94276)

2024-06-03 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

The `clang/test/Driver/sysroot.c` test has passed in my environment.

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


[clang] [Driver] Fix the sysroot.c test properly (PR #94276)

2024-06-03 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

I'm still building the toolchain in my environment. I'll let you known the test 
results.

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


[clang] [Driver] Remove a bunch of unnecessary REQUIRES constraints (PR #94055)

2024-06-03 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

>FTR, when I say I could not reproduce on X86 Windows, exactly what I did is 
>build on an X86 Windows host but include only the AArch64 target. The test 
>passed.

got it, thank you. I took a closer look to the failures and I found that most 
of them (except Clang::hexagon-toolchain-elf.c) have failed because of --sysroot
```
...
ld.lld "--sysroot=c:/buildbot/fs/jetson-agx-ubuntu" 
"--sysroot=c:/buildbot/fs/jetson-agx-ubuntu" ...
```
does not look good.

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


[clang] [Driver] Remove a bunch of unnecessary REQUIRES constraints (PR #94055)

2024-06-03 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@pogo59.

these two bots support *ONLY* ARM and Aarch64 targets (one target for the 
single bot). Also, this is the cross platform builders.
When you remove a requirement of the MIPS target for the mips's test it will 
get executed for the arm/aarch64 toolchain environment and most likely it will 
get failed. MIPS and ARM are the different targets, right? The same thing for 
the hecagon's tests. You need to apply the appropriate target requirements for 
the target depended tests to allow their execution on only in the proper 
environment.

>The best I can do is mark them UNSUPPORTED: system-windows to get the bots 
>green again.

This is not a good idea. You will disable these tests for the appropriate cross 
builders for no reason and they will became useless for them. I would strongly 
recommend to revert #94253 and assign the correct target requirements for the 
failed tests (or restore the previous ones).
 

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


[clang] [lldb] [llvm] Remove some `try_compile` CMake checks for compiler flags (PR #92953)

2024-05-31 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

Hi @Endilll ,

these changes break MSVC build of the projects including LLDB. The `cl` 
compiler gets unsupported gcc/clang options, such as 
`-Wno-deprecated-declarations`, `-Wno-unknown-pragmas` and 
`-Wno-strict-aliasing`, and gets failed because of it.

Here is the command line:
```
 [267/5832] Building CXX object 
tools\lldb\utils\TableGen\CMakeFiles\lldb-tblgen.dir\LLDBOptionDefEmitter.cpp.obj
FAILED: 
tools/lldb/utils/TableGen/CMakeFiles/lldb-tblgen.dir/LLDBOptionDefEmitter.cpp.obj
 
ccache 
C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1439~1.335\bin\Hostx64\x64\cl.exe
  /nologo /TP -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE 
-D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS 
-D_ENABLE_EXTENDED_ALIGNED_STORAGE -D_GLIBCXX_ASSERTIONS -D_HAS_EXCEPTIONS=0 
-D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE 
-D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS 
-IC:\path-to-build-dir\build-lldb\tools\lldb\utils\TableGen 
-IC:\path-to-build-dir\lldb\utils\TableGen -IC:\path-to-build-dir\lldb\include 
-IC:\path-to-build-dir\build-lldb\tools\lldb\include 
-IC:\path-to-build-dir\build-lldb\include -IC:\path-to-build-dir\llvm\include 
-IC:\Python312\include -IC:\path-to-build-dir\llvm\..\clang\include 
-IC:\path-to-build-dir\build-lldb\tools\lldb\..\clang\include -D__OPTIMIZE__ 
/Zc:inline /Zc:preprocessor /Zc:__cplusplus /Oi /bigobj /permissive- /W4 
-wd4141 -wd4146 -wd4244 -wd4267 -wd4291 -wd4351 -wd4456 -wd4457 -wd4458 -wd4459 
-wd4503 -wd4624 -wd4722 -wd4100 -wd4127 -wd4512 -wd4505 -wd4610 -wd4510 -wd4702 
-wd4245 -wd4706 -wd4310 -wd4701 -wd4703 -wd4389 -wd4611 -wd4805 -wd4204 -wd4577 
-wd4091 -wd4592 -wd4319 -wd4709 -wd5105 -wd4324 -w14062 -we4238 /Gw 
-Wno-deprecated-declarations -Wno-unknown-pragmas -Wno-strict-aliasing /O2 /Ob2 
 -MD   -wd4018 -wd4068 -wd4150 -wd4201 -wd4251 -wd4521 -wd4530 -wd4589  /EHs-c- 
/GR- -UNDEBUG -std:c++17 /showIncludes 
/Fotools\lldb\utils\TableGen\CMakeFiles\lldb-tblgen.dir\LLDBOptionDefEmitter.cpp.obj
 /Fdtools\lldb\utils\TableGen\CMakeFiles\lldb-tblgen.dir\ /FS -c 
C:\path-to-build-dir\lldb\utils\TableGen\LLDBOptionDefEmitter.cpp
```

This is the cl error:
```
cl : Command line error D8021 : invalid numeric argument 
'/Wno-deprecated-declarations'
```

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


[clang] [clang-repl] Set up executor implicitly to account for init PTUs (PR #84758)

2024-05-28 Thread Vladimir Vereschaka via cfe-commits
Stefan =?utf-8?q?Gr=C3=A4nitz?= ,
Stefan =?utf-8?q?Gr=C3=A4nitz?= ,
Stefan =?utf-8?q?Gr=C3=A4nitz?= 
Message-ID:
In-Reply-To: 


vvereschaka wrote:

Few bots are still failed because of the broken clang tests:
* https://lab.llvm.org/buildbot/#/builders/86/builds/80970
* https://lab.llvm.org/buildbot/#/builders/119/builds/18671
* https://lab.llvm.org/buildbot/#/builders/60/builds/17381

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


[clang] [CMake] Update CMake cache file for the Win-to-Arm cross toolchains. NFC. (PR #93363)

2024-05-24 Thread Vladimir Vereschaka via cfe-commits

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


[clang] [CMake] Update CMake cache file for the Win-to-Arm cross toolchains. NFC. (PR #93363)

2024-05-24 Thread Vladimir Vereschaka via cfe-commits

https://github.com/vvereschaka created 
https://github.com/llvm/llvm-project/pull/93363

* allow configuration for the target specific compiler flags.
* allow lld linker for all linker outputs: shared, module and exe.
* allow configuration of libc++ ABI version.
* set MSVC runtime library to MultiThreadedDLL/MultiThreadedDebugDLL on Windows 
build hosts.
* install UCRT libraries on Windows build hosts

>From 8a6e41d0f27885d67e9b81f2afd7a9897485e85d Mon Sep 17 00:00:00 2001
From: Vladimir Vereschaka 
Date: Fri, 24 May 2024 18:34:53 -0700
Subject: [PATCH] [CMake] Update CMake cache file for the Win-to-Arm cross
 toolchains. NFC.

* allow configuration for the target specific compiler flags.
* allow lld linker for all linker outputs: shared, module and exe.
* allow configuration of libc++ ABI version.
* set MSVC runtime library to MultiThreadedDLL/MultiThreadedDebugDLL on Windows 
build hosts.
* install UCRT libraries on Windows build hosts
---
 clang/cmake/caches/CrossWinToARMLinux.cmake | 38 +++--
 1 file changed, 35 insertions(+), 3 deletions(-)

diff --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index 736a54ece550c..62e87c6c62f85 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -89,6 +89,13 @@ endif()
 
 message(STATUS "Toolchain target to build: ${LLVM_TARGETS_TO_BUILD}")
 
+# Allow to override libc++ ABI version. Use 2 by default.
+if (NOT DEFINED LIBCXX_ABI_VERSION)
+  set(LIBCXX_ABI_VERSION 2)
+endif()
+
+message(STATUS "Toolchain's Libc++ ABI version: ${LIBCXX_ABI_VERSION}")
+
 if (NOT DEFINED CMAKE_BUILD_TYPE)
   set(CMAKE_BUILD_TYPE "Release" CACHE STRING "")
 endif()
@@ -109,8 +116,15 @@ set(CLANG_DEFAULT_OBJCOPY   "llvm-objcopy" 
CACHE STRING "")
 set(CLANG_DEFAULT_RTLIB "compiler-rt" CACHE STRING "")
 set(CLANG_DEFAULT_UNWINDLIB "libunwind" CACHE STRING "")
 
-if(WIN32)
-  set(CMAKE_MSVC_RUNTIME_LIBRARY"MultiThreaded" CACHE STRING "")
+if (NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY AND WIN32)
+  #Note: Always specify MT DLL for the LLDB build configurations on Windows 
host.
+  if (CMAKE_BUILD_TYPE STREQUAL "Debug")
+set(CMAKE_MSVC_RUNTIME_LIBRARY"MultiThreadedDebugDLL" CACHE 
STRING "")
+  else()
+set(CMAKE_MSVC_RUNTIME_LIBRARY"MultiThreadedDLL" CACHE STRING 
"")
+  endif()
+  # Grab all ucrt/vcruntime related DLLs into the binary installation folder.
+  set(CMAKE_INSTALL_UCRT_LIBRARIES  ON CACHE BOOL "")
 endif()
 
 # Set up RPATH for the target runtime/builtin libraries.
@@ -127,6 +141,15 @@ set(BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_INSTALL_RPATH
 set(BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_BUILD_WITH_INSTALL_RPATH 
   ON  CACHE BOOL "")
 set(BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_LLVM_CMAKE_DIR 
   "${LLVM_PROJECT_DIR}/llvm/cmake/modules" CACHE PATH "")
 
+if (DEFINED TOOLCHAIN_TARGET_COMPILER_FLAGS)
+  foreach(lang C;CXX;ASM)
+set(BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_${lang}_FLAGS 
"${TOOLCHAIN_TARGET_COMPILER_FLAGS}" CACHE STRING "")
+  endforeach()
+endif()
+foreach(type SHARED;MODULE;EXE)
+  set(BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_${type}_LINKER_FLAGS
"-fuse-ld=lld" CACHE STRING "")
+endforeach()
+
 set(LLVM_RUNTIME_TARGETS"${TOOLCHAIN_TARGET_TRIPLE}" CACHE 
STRING "")
 set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR  ON CACHE BOOL "")
 
@@ -137,6 +160,15 @@ set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_SYSROOT
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_INSTALL_RPATH
   "${RUNTIMES_INSTALL_RPATH}"  CACHE STRING "")
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_BUILD_WITH_INSTALL_RPATH 
   ON  CACHE BOOL "")
 
+if (DEFINED TOOLCHAIN_TARGET_COMPILER_FLAGS)
+  foreach(lang C;CXX;ASM)
+set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_${lang}_FLAGS 
"${TOOLCHAIN_TARGET_COMPILER_FLAGS}" CACHE STRING "")
+  endforeach()
+endif()
+foreach(type SHARED;MODULE;EXE)
+  set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_${type}_LINKER_FLAGS
"-fuse-ld=lld" CACHE STRING "")
+endforeach()
+
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_COMPILER_RT_BUILD_BUILTINS 
   ON CACHE BOOL "")
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_COMPILER_RT_BUILD_SANITIZERS   
   OFF CACHE BOOL "")
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_COMPILER_RT_BUILD_XRAY 
   OFF CACHE BOOL "")
@@ -164,7 +196,7 @@ 
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_ENABLE_SHARED
 
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_USE_COMPILER_RT 
   ON CACHE BOOL "")
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ENABLE_SHARED   
   OFF CACHE BOOL "")
-set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ABI_VERSION 
   2 CACHE STRING "")
+set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ABI_VERSION 
 

[clang] [AArch64] add some more tests for FMV (PR #91490)

2024-05-09 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@tmatheson-arm 
broken builder
* https://lab.llvm.org/buildbot/#/builders/119/builds/18102
* https://lab.llvm.org/buildbot/#/builders/60/builds/17123

would you take care of it or revert the changes?

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


[clang] [AArch64] add some more tests for FMV (PR #91490)

2024-05-09 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@tmatheson-arm , the `Clang::aarch64-fmv.c` gets failed on Windows to Arm Linux 
cross builds with the following errors:

```
# .---command stderr
# | 
C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Driver\aarch64-fmv.c:27:18:
 error: FMV-DISABLED: expected string not found in input
# | // FMV-DISABLED: "-target-feature" "-fmv"
# |  ^
# | :1:1: note: scanning from here
# | clang version 19.0.0git (https://github.com/llvm/llvm-project.git 
639a740035b732e9bc0f43f3f95d1ce3acf82e1b)
# | ^
# | :7:362: note: possible intended match here
# |  "C:\\buildbot\\as-builder-2\\x-aarch64\\build\\bin\\clang.exe" "-cc1" 
"-triple" "aarch64" "-emit-obj" "-disable-free" "-clear-ast-before-backend" 
"-main-file-name" "aarch64-fmv.c" "-mrelocation-model" "static" 
"-mframe-pointer=non-leaf" "-fmath-errno" "-ffp-contract=on" 
"-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" 
"generic" "-target-feature" "+v8a" "-target-feature" "+fp-armv8" 
"-target-feature" "+neon" "-target-abi" "aapcs" "-debugger-tuning=gdb" 
"-fdebug-compilation-dir=C:\\buildbot\\as-builder-2\\x-aarch64\\build\\tools\\clang\\test\\Driver"
 
"-fcoverage-compilation-dir=C:\\buildbot\\as-builder-2\\x-aarch64\\build\\tools\\clang\\test\\Driver"
 "-resource-dir" "C:\\buildbot\\as-builder-2\\x-aarch64\\build\\lib\\clang\\19" 
"-isysroot" "c:/buildbot/fs/jetson-agx-ubuntu" "-ferror-limit" "19" 
"-fno-signed-char" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf" "-faddrsig" 
"-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "aarch64-fmv.o" "-x" "c" 
"C:\\buildbot\\as-builder-2\\x-aarch64\\llvm-project\\clang\\test\\Driver\\aarch64-fmv.c"
# | 



 ^
# | 
# | Input file: 
# | Check file: 
C:\buildbot\as-builder-2\x-aarch64\llvm-project\clang\test\Driver\aarch64-fmv.c
# | 
# | -dump-input=help explains the following input dump.
# | 
# | Input was:
# | <<
# | 1: clang version 19.0.0git 
(https://github.com/llvm/llvm-project.git 
639a740035b732e9bc0f43f3f95d1ce3acf82e1b) 
# | check:27'0 
X~~~
 error: no match found
# | 2: Target: aarch64 
# | check:27'0 
# | 3: Thread model: posix 
# | check:27'0 
# | 4: InstalledDir: C:\buildbot\as-builder-2\x-aarch64\build\bin 
# | check:27'0 ~~~
# | 5: Build config: +assertions 
# | check:27'0 ~~
# | 6:  (in-process) 
# | check:27'0 ~~
# | 7:  
"C:\\buildbot\\as-builder-2\\x-aarch64\\build\\bin\\clang.exe" "-cc1" "-triple" 
"aarch64" "-emit-obj" "-disable-free" "-clear-ast-before-backend" 
"-main-file-name" "aarch64-fmv.c" "-mrelocation-model" "static" 
"-mframe-pointer=non-leaf" "-fmath-errno" "-ffp-contract=on" 
"-fno-rounding-math" "-mconstructor-aliases" "-funwind-tables=2" "-target-cpu" 
"generic" "-target-feature" "+v8a" "-target-feature" "+fp-armv8" 
"-target-feature" "+neon" "-target-abi" "aapcs" "-debugger-tuning=gdb" 
"-fdebug-compilation-dir=C:\\buildbot\\as-builder-2\\x-aarch64\\build\\tools\\clang\\test\\Driver"
 
"-fcoverage-compilation-dir=C:\\buildbot\\as-builder-2\\x-aarch64\\build\\tools\\clang\\test\\Driver"
 "-resource-dir" "C:\\buildbot\\as-builder-2\\x-aarch64\\build\\lib\\clang\\19" 
"-isysroot" "c:/buildbot/fs/jetson-agx-ubuntu" "-ferror-limit" "19" 
"-fno-signed-char" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf" "-faddrsig" 
"-D__GCC_HAVE_DWARF2_CFI_ASM=1" "-o" "aarch64-fmv.o" "-x" "c" 
"C:\\buildbot\\as-builder-2\\x-aarch64\\llvm-project\\clang\\test\\Driver\\aarch64-fmv.c"
 
# | check:27'0 

[clang] [CMake] Update CMake cache file for the Win-to-Arm cross toolchains. NFC. (PR #87113)

2024-03-29 Thread Vladimir Vereschaka via cfe-commits

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


[clang] [CMake] Update CMake cache file for the Win-to-Arm cross toolchains. NFC. (PR #87113)

2024-03-29 Thread Vladimir Vereschaka via cfe-commits

https://github.com/vvereschaka created 
https://github.com/llvm/llvm-project/pull/87113

Review the actual component parameters and update the cache file accordingly. 
Also fixed the C++ test builds for the compiler-rt component.

>From bf660e351d605db3062d782c6f526ac062548803 Mon Sep 17 00:00:00 2001
From: Vladimir Vereschaka 
Date: Fri, 29 Mar 2024 14:19:50 -0700
Subject: [PATCH] [CMake] Update CMake cache file for the Win-to-Arm cross
 toolchains. NFC.

Review the actual component parameters and update the cache file accordingly.
Also fixed the C++ test builds for the compiler-rt component.
---
 clang/cmake/caches/CrossWinToARMLinux.cmake | 42 -
 1 file changed, 32 insertions(+), 10 deletions(-)

diff --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index 2a0953af53fadd..736a54ece550c6 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -29,6 +29,11 @@
 #  cmake --build . --target check-cxxabi-
 #  cmake --build . --target check-unwind-
 #  cmake --build . --target check-cxx-
+# (another way to execute the tests)
+# python bin/llvm-lit.py -v --threads=32 
runtimes/runtimes-bins/libunwind/test  2>&1 | tee 
libunwind-tests.log
+# python bin/llvm-lit.py -v --threads=32 
runtimes/runtimes--bins/libcxxabi/test 2>&1 | tee 
libcxxabi-tests.log
+# python bin/llvm-lit.py -v --threads=32 
runtimes/runtimes--bins/libcxx/test2>&1 | tee 
libcxx-tests.log
+
 
 # LLVM_PROJECT_DIR is the path to the llvm-project directory.
 # The right way to compute it would probably be to use 
"${CMAKE_SOURCE_DIR}/../",
@@ -42,9 +47,6 @@ if (NOT DEFINED DEFAULT_SYSROOT)
   message(WARNING "DEFAULT_SYSROOT must be specified for the cross toolchain 
build.")
 endif()
 
-if (NOT DEFINED LLVM_TARGETS_TO_BUILD)
-  set(LLVM_TARGETS_TO_BUILD "ARM" CACHE STRING "")
-endif()
 if (NOT DEFINED LLVM_ENABLE_ASSERTIONS)
   set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
 endif()
@@ -56,7 +58,7 @@ if (NOT DEFINED LLVM_ENABLE_RUNTIMES)
 endif()
 
 if (NOT DEFINED TOOLCHAIN_TARGET_TRIPLE)
-  set(TOOLCHAIN_TARGET_TRIPLE "armv7-unknown-linux-gnueabihf")
+  set(TOOLCHAIN_TARGET_TRIPLE "aarch64-unknown-linux-gnu")
 else()
   #NOTE: we must normalize specified target triple to a fully specified triple,
   # including the vendor part. It is necessary to synchronize the runtime 
library
@@ -74,24 +76,38 @@ else()
   string(REPLACE ";" "-" TOOLCHAIN_TARGET_TRIPLE "${TOOLCHAIN_TARGET_TRIPLE}")
 endif()
 
+message(STATUS "Toolchain target triple: ${TOOLCHAIN_TARGET_TRIPLE}")
+
+if (NOT DEFINED LLVM_TARGETS_TO_BUILD)
+  if ("${TOOLCHAIN_TARGET_TRIPLE}" MATCHES "^(armv|arm32)+")
+set(LLVM_TARGETS_TO_BUILD "ARM" CACHE STRING "")
+  endif()
+  if ("${TOOLCHAIN_TARGET_TRIPLE}" MATCHES "^(aarch64|arm64)+")
+set(LLVM_TARGETS_TO_BUILD "AArch64" CACHE STRING "")
+  endif()
+endif()
+
+message(STATUS "Toolchain target to build: ${LLVM_TARGETS_TO_BUILD}")
+
 if (NOT DEFINED CMAKE_BUILD_TYPE)
   set(CMAKE_BUILD_TYPE "Release" CACHE STRING "")
 endif()
 
-message(STATUS "Toolchain target triple: ${TOOLCHAIN_TARGET_TRIPLE}")
-
 set(CMAKE_CROSSCOMPILINGON CACHE BOOL "")
 set(CMAKE_CL_SHOWINCLUDES_PREFIX"Note: including file: " CACHE 
STRING "")
 # Required if COMPILER_RT_DEFAULT_TARGET_ONLY is ON
 set(CMAKE_C_COMPILER_TARGET "${TOOLCHAIN_TARGET_TRIPLE}" CACHE 
STRING "")
 set(CMAKE_CXX_COMPILER_TARGET   "${TOOLCHAIN_TARGET_TRIPLE}" CACHE 
STRING "")
 
-set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR  ON CACHE BOOL "")
 set(LLVM_DEFAULT_TARGET_TRIPLE  "${TOOLCHAIN_TARGET_TRIPLE}" CACHE 
STRING "")
 set(LLVM_TARGET_ARCH"${TOOLCHAIN_TARGET_TRIPLE}" CACHE 
STRING "")
 set(LLVM_LIT_ARGS   "-vv ${LLVM_LIT_ARGS}" CACHE 
STRING "" FORCE)
 
+set(CLANG_DEFAULT_CXX_STDLIB"libc++" CACHE STRING "")
 set(CLANG_DEFAULT_LINKER"lld" CACHE STRING "")
+set(CLANG_DEFAULT_OBJCOPY   "llvm-objcopy" CACHE STRING "")
+set(CLANG_DEFAULT_RTLIB "compiler-rt" CACHE STRING "")
+set(CLANG_DEFAULT_UNWINDLIB "libunwind" CACHE STRING "")
 
 if(WIN32)
   set(CMAKE_MSVC_RUNTIME_LIBRARY"MultiThreaded" CACHE STRING "")
@@ -109,9 +125,10 @@ set(BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_SYSTEM_NAME
 set(BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_SYSROOT  
   "${DEFAULT_SYSROOT}"  CACHE STRING "")
 set(BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_INSTALL_RPATH
   "${RUNTIMES_INSTALL_RPATH}"  CACHE STRING "")
 set(BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_CMAKE_BUILD_WITH_INSTALL_RPATH 
   ON  CACHE BOOL "")
-
+set(BUILTINS_${TOOLCHAIN_TARGET_TRIPLE}_LLVM_CMAKE_DIR 
   "${LLVM_PROJECT_DIR}/llvm/cmake/modules" CACHE PATH "")
 
 set(LLVM_RUNTIME_TARGETS"${TOOLCHAIN_TARGET_TRIPLE}" CACHE 

[clang] [clang-repl] Expose CreateExecutor() and ResetExecutor() in extended Interpreter interface (PR #84460)

2024-03-12 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

Thank you @weliveindetail 

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


[clang] [clang-repl] Expose CreateExecutor() and ResetExecutor() in extended Interpreter interface (PR #84460)

2024-03-12 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@weliveindetail ,
the 
`Clang-Unit::ClangReplInterpreterTests.exe/InterpreterExtensionsTest/ExecutorCreateReset`
 gets failed on the Clang Windows buidler
* 
https://lab.llvm.org/buildbot/#/builders/86/builds/76043/steps/8/logs/FAIL__Clang-Unit__ClangReplInterpreterTests_exe_In

```
C:\buildbot\as-builder-3\llvm-clang-x86_64-win-fast\llvm-project\clang\unittests\Interpreter\InterpreterExtensionsTest.cpp(51):
 error: Value of: llvm::detail::TakeError(Interp.testCreateExecutor())
Expected: failed with Error whose message has 1 element that is equal to 
"Operation failed. Execution engine exists"
  Actual: failed  (Unable to find target for this triple (no targets are 
registered)), whose element #0 doesn't match
 ```

would you take care of it?


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


[libcxx] [libcxxabi] [libunwind] [libc++/libc++abi/libunwind] Add new test configs for Clang runtime library. NFC. (PR #82734)

2024-03-04 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@ldionne , would take a quick look? These test configurations are based on the 
default llvm test configurations for the static libraries, but just added 
`clang_rt` library into the linker's command line.
Thanks.

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


[libcxx] [libcxxabi] [libunwind] [libc++/libc++abi/libunwind] Add new test configs for Clang runtime library. NFC. (PR #82734)

2024-02-22 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

Also it fixes the `llvm-libc++-static.cfg.in::mul_sat.pass.cpp` test for some 
of the cross target builds
https://lab.llvm.org/buildbot/#/builders/143/builds/631/steps/14/logs/FAIL__llvm-libc__-static_cfg_in__mul_sat_pass_cpp

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


[libcxx] [libcxxabi] [libunwind] [libc++/libc++abi/libunwind] Add new test configs for Clang runtime library. NFC. (PR #82734)

2024-02-22 Thread Vladimir Vereschaka via cfe-commits

https://github.com/vvereschaka created 
https://github.com/llvm/llvm-project/pull/82734

These configurations use the target "just-built" Clang's runtime library 
(clang_rt.builtins) to link the tests.

>From 7c26b85f1d70ae25c7604aec1d7f3d316747dbdb Mon Sep 17 00:00:00 2001
From: Vladimir Vereschaka 
Date: Thu, 22 Feb 2024 14:31:00 -0800
Subject: [PATCH] [libc++/libc++abi/libunwind] Add new test configs for Clang
 runtime library. NFC.

These configurations use the target "just-built" Clang's runtime library
(clang_rt.builtins) to link the tests.
---
 .../llvm-libc++-static-clang-rt.cfg.in| 32 
 .../llvm-libc++abi-static-clang-rt.cfg.in | 32 
 .../llvm-libunwind-static-clang-rt.cfg.in | 51 +++
 3 files changed, 115 insertions(+)
 create mode 100644 libcxx/test/configs/llvm-libc++-static-clang-rt.cfg.in
 create mode 100644 libcxxabi/test/configs/llvm-libc++abi-static-clang-rt.cfg.in
 create mode 100644 libunwind/test/configs/llvm-libunwind-static-clang-rt.cfg.in

diff --git a/libcxx/test/configs/llvm-libc++-static-clang-rt.cfg.in 
b/libcxx/test/configs/llvm-libc++-static-clang-rt.cfg.in
new file mode 100644
index 00..ce6680ddc2908d
--- /dev/null
+++ b/libcxx/test/configs/llvm-libc++-static-clang-rt.cfg.in
@@ -0,0 +1,32 @@
+# This testing configuration handles running the test suite against LLVM's 
libc++
+# using a static library.
+#
+# This configuration uses a 'just-built' Clang runtime builtins library to 
link with
+# the tests instead of the target system library.
+#
+# Provided for testing of the LLVM/Clang toolchain builds.
+
+lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
+
+config.substitutions.append(('%{flags}',
+'-pthread' + (' -isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if 
'@CMAKE_OSX_SYSROOT@' else '')
+))
+config.substitutions.append(('%{compile_flags}',
+'-nostdinc++ -I %{include-dir} -I %{target-include-dir} -I 
%{libcxx-dir}/test/support'
+))
+config.substitutions.append(('%{link_flags}',
+'-nostdlib++ -L %{lib-dir} -lclang_rt.builtins -lc++ -lc++abi'
+))
+config.substitutions.append(('%{exec}',
+'%{executor} --execdir %T -- '
+))
+
+import os, site
+site.addsitedir(os.path.join('@LIBCXX_SOURCE_DIR@', 'utils'))
+import libcxx.test.params, libcxx.test.config
+libcxx.test.config.configure(
+libcxx.test.params.DEFAULT_PARAMETERS,
+libcxx.test.features.DEFAULT_FEATURES,
+config,
+lit_config
+)
diff --git a/libcxxabi/test/configs/llvm-libc++abi-static-clang-rt.cfg.in 
b/libcxxabi/test/configs/llvm-libc++abi-static-clang-rt.cfg.in
new file mode 100644
index 00..11b89e22fca9d6
--- /dev/null
+++ b/libcxxabi/test/configs/llvm-libc++abi-static-clang-rt.cfg.in
@@ -0,0 +1,32 @@
+# This testing configuration handles running the test suite against LLVM's 
libc++abi
+# using a static library.
+#
+# This configuration uses a 'just-built' Clang runtime builtins library to 
link with
+# the tests instead of the target system library.
+#
+# Provided for testing of the LLVM/Clang toolchain builds.
+
+lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
+
+config.substitutions.append(('%{flags}',
+'-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else 
''
+))
+config.substitutions.append(('%{compile_flags}',
+'-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} 
%{maybe-include-libunwind} -I %{libcxx}/test/support -I %{libcxx}/src 
-D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS'
+))
+config.substitutions.append(('%{link_flags}',
+'-nostdlib++ -L %{lib} -lclang_rt.builtins -lc++ -lc++abi -pthread'
+))
+config.substitutions.append(('%{exec}',
+'%{executor} --execdir %T -- '
+))
+
+import os, site
+site.addsitedir(os.path.join('@LIBCXXABI_LIBCXX_PATH@', 'utils'))
+import libcxx.test.params, libcxx.test.config
+libcxx.test.config.configure(
+libcxx.test.params.DEFAULT_PARAMETERS,
+libcxx.test.features.DEFAULT_FEATURES,
+config,
+lit_config
+)
diff --git a/libunwind/test/configs/llvm-libunwind-static-clang-rt.cfg.in 
b/libunwind/test/configs/llvm-libunwind-static-clang-rt.cfg.in
new file mode 100644
index 00..d908a5d55c891c
--- /dev/null
+++ b/libunwind/test/configs/llvm-libunwind-static-clang-rt.cfg.in
@@ -0,0 +1,51 @@
+# Configuration file for running the libunwind tests against the static 
library.
+#
+# This configuration uses a 'just-built' Clang runtime builtins library to 
link with
+# the tests instead of the target system library.
+#
+# Provided for testing of the LLVM/Clang toolchain builds.
+
+lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg')
+
+compile_flags = []
+link_flags = ['-lclang_rt.builtins']
+
+if @LIBUNWIND_ENABLE_THREADS@:
+link_flags.append('-lpthread')
+
+if @LIBUNWIND_ENABLE_CET@:
+compile_flags.append('-fcf-protection=full')
+
+# On ELF platforms, link tests with -Wl,--export-dynamic if supported by 

[clang] [libc] [llvm] [openmp] [libc] Rework the GPU build to be a regular target (PR #81921)

2024-02-22 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@jhuber6 ,
looks like these changes break the following builds
* https://lab.llvm.org/buildbot/#/builders/235/builds/5630
* https://lab.llvm.org/buildbot/#/builders/232/builds/19808

there are a lot of CMake error messages started with 
```
CMake Error at cmake/modules/AddLLVM.cmake:631 (set_target_properties):
  set_target_properties called with incorrect number of arguments.
Call Stack (most recent call first):
  cmake/modules/AddLLVM.cmake:854 (llvm_add_library)
  lib/Transforms/Hello/CMakeLists.txt:13 (add_llvm_library)
-- Targeting X86
-- Targeting NVPTX
CMake Error at CMakeLists.txt:1213 (add_subdirectory):
  add_subdirectory given source "/unittest" which is not an existing
  directory.
CMake Error at tools/llvm-config/CMakeLists.txt:54 (string):
  string sub-command REGEX, mode MATCH needs at least 5 arguments total to
  command.
...
```
would you take care of it?

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


[clang] [clang-tools-extra] [flang] [mlir] [lld] [openmp] [compiler-rt] [lldb] [llvm] [libunwind] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

2024-01-11 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

also, you can try to start a `Force Build` with cleaning of the source/build 
directories for these builders. It should clean up the current source folder 
and reload it.

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


[compiler-rt] [lld] [clang-tools-extra] [mlir] [libunwind] [flang] [llvm] [lldb] [openmp] [clang] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

2024-01-11 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@HaohaiWen 
>We may need to manually delete LLVM::windows-seh-EHa-PreserveCFG.s on those 
>machines.
ok, got it. I'll do it for those builders.

>Do you know who can help us to delete it?
if you see some other failed builders because of this problem you can find 
their owners on the `Workers` tab, `Admin` column
https://lab.llvm.org/buildbot/#/workers


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


[flang] [clang] [lld] [compiler-rt] [libunwind] [mlir] [clang-tools-extra] [lldb] [llvm] [openmp] [BranchFolding] Fix missing predecessors of landing-pad (PR #77608)

2024-01-11 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@HaohaiWen ,
looks like these changes break some builders with the failed test
`UNRESOLVED: LLVM::windows-seh-EHa-PreserveCFG.s`

https://lab.llvm.org/buildbot/#/builders/234
https://lab.llvm.org/buildbot/#/builders/58
https://lab.llvm.org/buildbot/#/builders/104
https://lab.llvm.org/buildbot/#/builders/235

>Oh, sorry. I fixed it in https://github.com/llvm/llvm-project/pull/77784.
it didn't fix the problem.

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


[clang] [Sema] Fix crash on invalid code with parenthesized aggregate initialization (PR #76232)

2023-12-22 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

these changes break the libc++ tests - 
`llvm-libc++-static.cfg.in::transform_error.mandates.verify.cpp`

```
# .---command stderr
# | error: 'expected-error' diagnostics expected but not seen: 
# |   File * Line * (directive at 
C:\buildbot\as-builder-2\x-aarch64\llvm-project\libcxx\test\libcxx\utilities\expected\expected.void\transform_error.mandates.verify.cpp:49):
 {{(excess elements in struct initializer|no matching constructor for 
initialization of)}}{{.*}}
# |   File * Line * (directive at 
C:\buildbot\as-builder-2\x-aarch64\llvm-project\libcxx\test\libcxx\utilities\expected\expected.void\transform_error.mandates.verify.cpp:53):
 {{(excess elements in struct initializer|no matching constructor for 
initialization of)}}{{.*}}
# |   File * Line * (directive at 
C:\buildbot\as-builder-2\x-aarch64\llvm-project\libcxx\test\libcxx\utilities\expected\expected.void\transform_error.mandates.verify.cpp:61):
 {{(excess elements in struct initializer|no matching constructor for 
initialization of)}}{{.*}}
# |   File * Line * (directive at 
C:\buildbot\as-builder-2\x-aarch64\llvm-project\libcxx\test\libcxx\utilities\expected\expected.void\transform_error.mandates.verify.cpp:63):
 {{(excess elements in struct initializer|no matching constructor for 
initialization of)}}{{.*}}
# |   File * Line * (directive at 
C:\buildbot\as-builder-2\x-aarch64\llvm-project\libcxx\test\libcxx\utilities\expected\expected.void\transform_error.mandates.verify.cpp:70):
 {{(excess elements in struct initializer|no matching constructor for 
initialization of)}}{{.*}}
# |   File * Line * (directive at 
C:\buildbot\as-builder-2\x-aarch64\llvm-project\libcxx\test\libcxx\utilities\expected\expected.void\transform_error.mandates.verify.cpp:72):
 {{(excess elements in struct initializer|no matching constructor for 
initialization of)}}{{.*}}
# |   File * Line * (directive at 
C:\buildbot\as-builder-2\x-aarch64\llvm-project\libcxx\test\libcxx\utilities\expected\expected.void\transform_error.mandates.verify.cpp:79):
 {{(excess elements in struct initializer|no matching constructor for 
initialization of)}}{{.*}}
# |   File * Line * (directive at 
C:\buildbot\as-builder-2\x-aarch64\llvm-project\libcxx\test\libcxx\utilities\expected\expected.void\transform_error.mandates.verify.cpp:81):
 {{(excess elements in struct initializer|no matching constructor for 
initialization of)}}{{.*}}
# | 8 errors generated.
# `-
# error: command failed with exit status: 1

```

https://lab.llvm.org/buildbot/#/builders/119/builds/16381
https://lab.llvm.org/buildbot/#/builders/60/builds/15226

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


[clang] 7022a24 - [ClangRepl] Fix failed ClangReplInterpreter unit tests (#75556).

2023-12-20 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2023-12-20T00:11:12-08:00
New Revision: 7022a24771c8404f847abb226735a3ae21794426

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

LOG: [ClangRepl] Fix failed ClangReplInterpreter unit tests (#75556).

See more details: https://lab.llvm.org/buildbot/#/builders/119/builds/16346

Behalf of @vgvassilev

Added: 


Modified: 
clang/unittests/Interpreter/CodeCompletionTest.cpp

Removed: 




diff  --git a/clang/unittests/Interpreter/CodeCompletionTest.cpp 
b/clang/unittests/Interpreter/CodeCompletionTest.cpp
index cd7fdfa588a5d0..873fbda32f0579 100644
--- a/clang/unittests/Interpreter/CodeCompletionTest.cpp
+++ b/clang/unittests/Interpreter/CodeCompletionTest.cpp
@@ -50,16 +50,9 @@ static std::vector runComp(clang::Interpreter 
,
   return Comps;
 }
 
-#ifdef _AIX
-TEST(CodeCompletionTest, DISABLED_Sanity) {
-#else
 TEST(CodeCompletionTest, Sanity) {
-#endif
   auto Interp = createInterpreter();
-  if (auto R = Interp->ParseAndExecute("int foo = 12;")) {
-consumeError(std::move(R));
-return;
-  }
+  cantFail(Interp->Parse("int foo = 12;"));
   auto Err = llvm::Error::success();
   auto comps = runComp(*Interp, "f", Err);
   EXPECT_EQ((size_t)2, comps.size()); // float and foo
@@ -68,36 +61,19 @@ TEST(CodeCompletionTest, Sanity) {
   EXPECT_EQ((bool)Err, false);
 }
 
-#ifdef _AIX
-TEST(CodeCompletionTest, DISABLED_SanityNoneValid) {
-#else
 TEST(CodeCompletionTest, SanityNoneValid) {
-#endif
   auto Interp = createInterpreter();
-  if (auto R = Interp->ParseAndExecute("int foo = 12;")) {
-consumeError(std::move(R));
-return;
-  }
+  cantFail(Interp->Parse("int foo = 12;"));
   auto Err = llvm::Error::success();
   auto comps = runComp(*Interp, "babanana", Err);
   EXPECT_EQ((size_t)0, comps.size()); // foo and float
   EXPECT_EQ((bool)Err, false);
 }
 
-#ifdef _AIX
-TEST(CodeCompletionTest, DISABLED_TwoDecls) {
-#else
 TEST(CodeCompletionTest, TwoDecls) {
-#endif
   auto Interp = createInterpreter();
-  if (auto R = Interp->ParseAndExecute("int application = 12;")) {
-consumeError(std::move(R));
-return;
-  }
-  if (auto R = Interp->ParseAndExecute("int apple = 12;")) {
-consumeError(std::move(R));
-return;
-  }
+  cantFail(Interp->Parse("int application = 12;"));
+  cantFail(Interp->Parse("int apple = 12;"));
   auto Err = llvm::Error::success();
   auto comps = runComp(*Interp, "app", Err);
   EXPECT_EQ((size_t)2, comps.size());
@@ -113,18 +89,9 @@ TEST(CodeCompletionTest, CompFunDeclsNoError) {
 
 TEST(CodeCompletionTest, TypedDirected) {
   auto Interp = createInterpreter();
-  if (auto R = Interp->ParseAndExecute("int application = 12;")) {
-consumeError(std::move(R));
-return;
-  }
-  if (auto R = Interp->ParseAndExecute("char apple = '2';")) {
-consumeError(std::move(R));
-return;
-  }
-  if (auto R = Interp->ParseAndExecute("void add(int ){}")) {
-consumeError(std::move(R));
-return;
-  }
+  cantFail(Interp->Parse("int application = 12;"));
+  cantFail(Interp->Parse("char apple = '2';"));
+  cantFail(Interp->Parse("void add(int ){}"));
   {
 auto Err = llvm::Error::success();
 auto comps = runComp(*Interp, std::string("add("), Err);
@@ -132,10 +99,7 @@ TEST(CodeCompletionTest, TypedDirected) {
 EXPECT_EQ((bool)Err, false);
   }
 
-  if (auto R = Interp->ParseAndExecute("int banana = 42;")) {
-consumeError(std::move(R));
-return;
-  }
+  cantFail(Interp->Parse("int banana = 42;"));
 
   {
 auto Err = llvm::Error::success();
@@ -157,22 +121,10 @@ TEST(CodeCompletionTest, TypedDirected) {
 
 TEST(CodeCompletionTest, SanityClasses) {
   auto Interp = createInterpreter();
-  if (auto R = Interp->ParseAndExecute("struct Apple{};")) {
-consumeError(std::move(R));
-return;
-  }
-  if (auto R = Interp->ParseAndExecute("void takeApple(Apple ){}")) {
-consumeError(std::move(R));
-return;
-  }
-  if (auto R = Interp->ParseAndExecute("Apple a1;")) {
-consumeError(std::move(R));
-return;
-  }
-  if (auto R = Interp->ParseAndExecute("void takeAppleCopy(Apple a1){}")) {
-consumeError(std::move(R));
-return;
-  }
+  cantFail(Interp->Parse("struct Apple{};"));
+  cantFail(Interp->Parse("void takeApple(Apple ){}"));
+  cantFail(Interp->Parse("Apple a1;"));
+  cantFail(Interp->Parse("void takeAppleCopy(Apple a1){}"));
 
   {
 auto Err = llvm::Error::success();
@@ -192,26 +144,11 @@ TEST(CodeCompletionTest, SanityClasses) {
 
 TEST(CodeCompletionTest, SubClassing) {
   auto Interp = createInterpreter();
-  if (auto R = Interp->ParseAndExecute("struct Fruit {};")) {
-consumeError(std::move(R));
-return;
-  }
-  if (auto R = Interp->ParseAndExecute("struct Apple : Fruit{};")) {
-consumeError(std::move(R));
-return;
-  }
-  if (auto R = 

[clang] [ClangRepl] Reland Semanic Code Completion (PR #75556)

2023-12-20 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

Works fine on my builder. Thank you. I'm going to land this patch.

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


[clang] [ClangRepl] Reland Semanic Code Completion (PR #75556)

2023-12-19 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

not a problem, I'll land this patch,

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


[clang] [ClangRepl] Reland Semanic Code Completion (PR #75556)

2023-12-19 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

I would like to do a full rebuild just in case. I'll let you know about the 
results.


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


[clang] [ClangRepl] Reland Semanic Code Completion (PR #75556)

2023-12-19 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@vgvassilev thank you. This patch looks promising, the tests have been passed 
successfully with it

```
-- Testing: 21 of 19608 tests, 21 workers --
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/8/21 (1 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/3/21 (2 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/5/21 (3 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/1/21 (4 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/7/21 (5 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/4/21 (6 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/0/21 (7 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/6/21 (8 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/12/21 (9 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/2/21 (10 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/9/21 (11 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/11/21 (12 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/10/21 (13 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/17/21 (14 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/18/21 (15 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/16/21 (16 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/15/21 (17 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/19/21 (18 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/20/21 (19 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/14/21 (20 of 21)
PASS: Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/13/21 (21 of 21)
```

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


[clang] [ClangRepl] Reland Semanic Code Completion (PR #75556)

2023-12-19 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

I also didn't noticed any related changes with the triple in these commits, but 
they were the only related with the interpreter in the failed build. I just 
tried to revert them and run these tests again.

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


[clang] [ClangRepl] Reland Semanic Code Completion (PR #75556)

2023-12-19 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

I tried to revert this commit and two next ones with the warning fixes (they 
are related) locally on the builder. The tests have passed successfully after 
reverting
These commits have been reverted
* 8c296d58c50902e367f64417948d6e2d43828f36
* 8dd77fa5ae2c20cce903501e9090c663bf97d144
* 35b366ace73d0ede3cdeeb4d09150a9945750b7f

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


[clang] [ClangRepl] Reland Semanic Code Completion (PR #75556)

2023-12-19 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

Looks like these changes break the`ClangReplInterpreterTests` unit tests 
* https://lab.llvm.org/buildbot/#/builders/119/builds/16346
* https://lab.llvm.org/buildbot/#/builders/60/builds/15188

* Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/17/21
* Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/18/21
* Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/20/21
* Clang-Unit :: Interpreter/./ClangReplInterpreterTests.exe/19/21

**No available targets are compatible with triple 
"x86_64-pc-windows-msvc19.37.32825**

The builders are ARM/Aarch64 only.

```
No available targets are compatible with triple 
"x86_64-pc-windows-msvc19.37.32825"
UNREACHABLE executed at 
C:\buildbot\temp\llvm-project\llvm\include\llvm/Support/Error.h:759!
Exception Code: 0x8003
 #0 0x7ff755428595 setGlobal(int) 
(C:\buildbot\temp\build\tools\clang\unittests\Interpreter\ClangReplInterpreterTests.exe+0x618595)
 #1 0x7ff75912bc46 clang::Value::printData(class llvm::raw_ostream &) const 
(C:\buildbot\temp\build\tools\clang\unittests\Interpreter\ClangReplInterpreterTests.exe+0x431bc46)
 #2 0x7ff75911d9dc clang::Value::printData(class llvm::raw_ostream &) const 
(C:\buildbot\temp\build\tools\clang\unittests\Interpreter\ClangReplInterpreterTests.exe+0x430d9dc)
 #3 0x7ff755398b16 setGlobal(int) 
(C:\buildbot\temp\build\tools\clang\unittests\Interpreter\ClangReplInterpreterTests.exe+0x588b16)
 #4 0x7ff754e99976 clang::Value::setUShort(unsigned short) 
(C:\buildbot\temp\build\tools\clang\unittests\Interpreter\ClangReplInterpreterTests.exe+0x89976)
 #5 0x7ff754e9c819 setGlobal(int) 
(C:\buildbot\temp\build\tools\clang\unittests\Interpreter\ClangReplInterpreterTests.exe+0x8c819)
 #6 0x7ff75546437b setGlobal(int) 
(C:\buildbot\temp\build\tools\clang\unittests\Interpreter\ClangReplInterpreterTests.exe+0x65437b)
 #7 0x7ff75548ae64 setGlobal(int) 
(C:\buildbot\temp\build\tools\clang\unittests\Interpreter\ClangReplInterpreterTests.exe+0x67ae64)
 #8 0x7ff75548b316 setGlobal(int) 
(C:\buildbot\temp\build\tools\clang\unittests\Interpreter\ClangReplInterpreterTests.exe+0x67b316)
 #9 0x7ff75548bd24 setGlobal(int) 
(C:\buildbot\temp\build\tools\clang\unittests\Interpreter\ClangReplInterpreterTests.exe+0x67bd24)
#10 0x7ff7554643bb setGlobal(int) 
(C:\buildbot\temp\build\tools\clang\unittests\Interpreter\ClangReplInterpreterTests.exe+0x6543bb)
#11 0x7ff75548b668 setGlobal(int) 
(C:\buildbot\temp\build\tools\clang\unittests\Interpreter\ClangReplInterpreterTests.exe+0x67b668)
#12 0x7ff7592023c5 clang::Value::printData(class llvm::raw_ostream &) const 
(C:\buildbot\temp\build\tools\clang\unittests\Interpreter\ClangReplInterpreterTests.exe+0x43f23c5)
#13 0x7ff759116640 clang::Value::printData(class llvm::raw_ostream &) const 
(C:\buildbot\temp\build\tools\clang\unittests\Interpreter\ClangReplInterpreterTests.exe+0x4306640)
#14 0x7ffea7ef7ac4 (C:\WINDOWS\System32\KERNEL32.DLL+0x17ac4)
#15 0x7ffea855a4e1 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x5a4e1)
```

Would you take care of it?

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


[libunwind] [runtimes] Fix parsing of LIB{CXX,CXXABI,UNWIND}_TEST_PARAMS (PR #67691)

2023-10-04 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@arichardson ,
would you commit these changes without @ldionne 's approval? or revert your 
#66545?

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


[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

2023-10-04 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@arichardson ,
would you commit these changes without @ldionne 's approval? or revert your 
#66545?

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


[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

2023-10-04 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@ldionne @arichardson ,
the problem is still there for more than 10 days already. Do you guys plan to 
fix it!

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


[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

2023-10-02 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@ldionne @arichardson any progress?

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


[libunwind] [runtimes] Fix parsing of LIB{CXX,CXXABI,UNWIND}_TEST_PARAMS (PR #67691)

2023-10-02 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@ldionne @arichardson any progress?

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


[clang] Introduce paged vector (PR #66430)

2023-09-30 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@vgvassilev ,
got failed tests: https://lab.llvm.org/buildbot/#/builders/86/builds/66095

* LLVM-Unit :: ADT/./ADTTests.exe/PagedVectorTest/EmptyTest
* LLVM-Unit :: ADT/./ADTTests.exe/PagedVectorTest/HalfPageFillingTest
* LLVM-Unit :: ADT/./ADTTests.exe/PagedVectorTest/ShrinkTest

would you take care of it?

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


[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

2023-09-29 Thread Vladimir Vereschaka via cfe-commits

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


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


[libunwind] [runtimes] Fix parsing of LIB{CXX,CXXABI,UNWIND}_TEST_PARAMS (PR #67691)

2023-09-29 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@arichardson ,
works fine on the builders locally. Thank you.
Would yo merge these changes if they are ready?

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


[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

2023-09-29 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@arichardson ,
works fine on the builders locally. Thank you.
Would yo merge these changes if they are ready?

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


[libunwind] [runtimes] Fix parsing of LIB{CXX,CXXABI,UNWIND}_TEST_PARAMS (PR #67691)

2023-09-29 Thread Vladimir Vereschaka via cfe-commits

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


[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

2023-09-29 Thread Vladimir Vereschaka via cfe-commits

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


[libunwind] [runtimes] Fix parsing of LIB{CXX,CXXABI,UNWIND}_TEST_PARAMS (PR #67691)

2023-09-29 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@arichardson,
thank you. I'm going to test it during the next 15-20 minutes.

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


[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

2023-09-29 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@arichardson,
thank you. I'm going to test it during the next 15-20 minutes.

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


[libunwind] [runtimes] Fix parsing of LIB{CXX,CXXABI,UNWIND}_TEST_PARAMS (PR #67691)

2023-09-29 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@arichardson,
any progress?!

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


[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

2023-09-29 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@arichardson,
any progress?!

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


[clang] [runtimes] Fix parsing of LIB{CXX, CXXABI, UNWIND}_TEST_PARAMS (PR #67691)

2023-09-28 Thread Vladimir Vereschaka via cfe-commits


@@ -151,6 +151,10 @@ 
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS
 
 find_package(Python3 COMPONENTS Interpreter)
 
+set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_TEST_PARAMS 
"${RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_TEST_PARAMS}" CACHE INTERNAL "")
+set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_TEST_PARAMS 
"${RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_TEST_PARAMS}" CACHE INTERNAL "")
+set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_TEST_PARAMS 
"${RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_TEST_PARAMS}" CACHE INTERNAL "")
+

vvereschaka wrote:

It is not working. This will store the empty variables in the cache file. If 
you check your local `CMakeCache.txt` for these variables you'll find them 
empty. You need to cache them with the values at the end of preparation (please 
check my original diff file).

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


[libunwind] [libc++][lit] Allow overriding the executor for tests (PR #66545)

2023-09-27 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

[executorfix.diff.txt](https://github.com/llvm/llvm-project/files/12745676/executorfix.diff.txt)

@arichardson ,

here is few updates for your fix (please see attached file):
* added an escaping of quotes for the serialized lit parameter. There could be 
an executor string something like that `"C:/Python310/python.exe" 
"C:/buildbot/temp/llvm-project/libcxx/utils/ssh.py" 
--host=ubu...@jetson6.lab.llvm.org`. We need to replace `"` with `\"` because 
it goes into the python's string.
* the test parameters are processing as a cmake list. We need to properly 
prepare `xxx_LIBxxx_TEST_PARAMS` variables in the cmake cache file.

The `libunwind` and `libc++abi` tests are passed successfully with these 
changes. I have started the `libc++` tests. It will take about 1 hour, but they 
already started successfully. These changes are working properly on the win 
cross toolchain builders.

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


[clang] [libc++][lit] Allow overriding the executor for tests (PR #66545)

2023-09-27 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

[executorfix.diff.txt](https://github.com/llvm/llvm-project/files/12745676/executorfix.diff.txt)

@arichardson ,

here is few updates for your fix (please see attached file):
* added an escaping of quotes for the serialized lit parameter. There could be 
an executor string something like that `"C:/Python310/python.exe" 
"C:/buildbot/temp/llvm-project/libcxx/utils/ssh.py" 
--host=ubu...@jetson6.lab.llvm.org`. We need to replace `"` with `\"` because 
it goes into the python's string.
* the test parameters are processing as a cmake list. We need to properly 
prepare `xxx_LIBxxx_TEST_PARAMS` variables in the cmake cache file.

The `libunwind` and `libc++abi` tests are passed successfully with these 
changes. I have started the `libc++` tests. It will take about 1 hour, but they 
already started successfully. These changes are working properly on the win 
cross toolchain builders.

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


[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-27 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

>edit: hopefully good after 
>https://github.com/llvm/llvm-project/commit/5aa3338930d15a59dd6ddbd36fc09ffa6610ca72

the test has been passed locally on the builder with this commit. Thank you for 
the fix.

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


[libunwind] [libc++][lit] Allow overriding the executor for tests (PR #66545)

2023-09-26 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@arichardson 

here is a problem with your changes when building the libraries on the windows 
cross toolchain builders
* https://lab.llvm.org/buildbot/#/builders/60/builds/14086
* https://lab.llvm.org/buildbot/#/builders/119/builds/15283

https://lab.llvm.org/buildbot/#/builders/60/builds/14086/steps/12/logs/stdio
```
llvm-lit.py: 
C:\buildbot\as-builder-1\x-armv7l\llvm-project\llvm\utils\lit\lit\TestingConfig.py:151:
 fatal: unable to parse config file 
'C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libunwind/test/cmake-bridge.cfg',
 traceback: Traceback (most recent call last):
  File 
"C:\buildbot\as-builder-1\x-armv7l\llvm-project\llvm\utils\lit\lit\TestingConfig.py",
 line 139, in load_from_path
exec(compile(data, path, "exec"), cfg_globals, None)
  File 
"C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libunwind/test/cmake-bridge.cfg",
 line 7
config. 'executor="C:/Python310/python.exe" 
"C:/buildbot/as-builder-1/x-armv7l/llvm-project/libcxx/utils/ssh.py" --host = 
"ubu...@jetson6.lab.llvm.org'"

   ^
SyntaxError: unterminated string literal (detected at line 7)

```
would you take care of it?

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


[clang] [libc++][lit] Allow overriding the executor for tests (PR #66545)

2023-09-26 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@arichardson 

here is a problem with your changes when building the libraries on the windows 
cross toolchain builders
* https://lab.llvm.org/buildbot/#/builders/60/builds/14086
* https://lab.llvm.org/buildbot/#/builders/119/builds/15283

https://lab.llvm.org/buildbot/#/builders/60/builds/14086/steps/12/logs/stdio
```
llvm-lit.py: 
C:\buildbot\as-builder-1\x-armv7l\llvm-project\llvm\utils\lit\lit\TestingConfig.py:151:
 fatal: unable to parse config file 
'C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libunwind/test/cmake-bridge.cfg',
 traceback: Traceback (most recent call last):
  File 
"C:\buildbot\as-builder-1\x-armv7l\llvm-project\llvm\utils\lit\lit\TestingConfig.py",
 line 139, in load_from_path
exec(compile(data, path, "exec"), cfg_globals, None)
  File 
"C:/buildbot/as-builder-1/x-armv7l/build/runtimes/runtimes-armv7-unknown-linux-gnueabihf-bins/libunwind/test/cmake-bridge.cfg",
 line 7
config. 'executor="C:/Python310/python.exe" 
"C:/buildbot/as-builder-1/x-armv7l/llvm-project/libcxx/utils/ssh.py" --host = 
"ubu...@jetson6.lab.llvm.org'"

   ^
SyntaxError: unterminated string literal (detected at line 7)

```
would you take care of it?

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


[clang] [Driver] Fix detection of libc++ with empty sysroot. (PR #66947)

2023-09-25 Thread Vladimir Vereschaka via cfe-commits

vvereschaka wrote:

@sam-mccall ,
your 7ca8c21af36acb117529e797b3d36e85a286ca47 commit breaks `Clang-Unit :: 
Driver/./ClangDriverTests.exe/ToolChainTest/VFSGnuLibcxxPathNoSysroot` 
(`Clang-Unit::67`) test on the windows toolchain builders
* https://lab.llvm.org/buildbot/#/builders/119/builds/15230
* https://lab.llvm.org/buildbot/#/builders/60/builds/14031 

The problem remains for more than 3 days already. Would you fix it as soon as 
it possible or revert your changes?


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


[clang] e97caa9 - Fixed Clang::Driver 'netbsd.c' test on Windows/Cross builders. NFC.

2023-01-11 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2023-01-11T17:30:23-08:00
New Revision: e97caa9a2855bd928d1d4ff5503262baa92b3b7f

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

LOG: Fixed Clang::Driver 'netbsd.c' test on Windows/Cross builders. NFC.

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

Added: 


Modified: 
clang/test/Driver/netbsd.c

Removed: 




diff  --git a/clang/test/Driver/netbsd.c b/clang/test/Driver/netbsd.c
index 5d76aac525d9..3fefaeb100e2 100644
--- a/clang/test/Driver/netbsd.c
+++ b/clang/test/Driver/netbsd.c
@@ -482,5 +482,5 @@
 // RUN: %clang -### %s --target=x86_64-unknown-netbsd -r 2>&1 \
 // RUN:   | FileCheck %s --check-prefix=DRIVER-PASS-INCLUDES
 // DRIVER-PASS-INCLUDES:  "-cc1" {{.*}}"-resource-dir" "[[RESOURCE:[^"]+]]"
-// DRIVER-PASS-INCLUDES-SAME: {{^}} "-internal-isystem" 
"[[RESOURCE]]{{/|}}include"
+// DRIVER-PASS-INCLUDES-SAME: "-internal-isystem" 
"[[RESOURCE]]{{/|}}include"
 // DRIVER-PASS-INCLUDES-SAME: {{^}} "-internal-externc-isystem" 
"{{.*}}/usr/include"



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


[clang] 3af06c7 - [CMake] Update cache file for Win to ARM Linux cross toolchain builders. NFC.

2022-10-06 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2022-10-06T19:40:33-07:00
New Revision: 3af06c72986356c6d580814fef80813ab3b3c34a

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

LOG: [CMake] Update cache file for Win to ARM Linux cross toolchain builders. 
NFC.

Do not specify the execution directory in the remote execution script command 
line
for the compiler-rt builtin library tests. There is a single execution file 
tests
within the single directory. No need to pack all of them every time, just run 
one by one.

Added: 


Modified: 
clang/cmake/caches/CrossWinToARMLinux.cmake

Removed: 




diff  --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index 3f80478d16e32..e6f5650eac466 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -160,7 +160,7 @@ if(DEFINED REMOTE_TEST_HOST)
   endif()
 
   set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_COMPILER_RT_EMULATOR
-"\\\"${Python3_EXECUTABLE}\\\" 
\\\"${LLVM_PROJECT_DIR}/llvm/utils/remote-exec.py\\\" --execdir %T 
--exec-pattern='.*\\.c.*\\.tmp.*' 
--host=${REMOTE_TEST_USER}@${REMOTE_TEST_HOST}"
+"\\\"${Python3_EXECUTABLE}\\\" 
\\\"${LLVM_PROJECT_DIR}/llvm/utils/remote-exec.py\\\" 
--host=${REMOTE_TEST_USER}@${REMOTE_TEST_HOST}"
 CACHE STRING "")
 
   set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_EXECUTOR   
   "${DEFAULT_TEST_EXECUTOR}" CACHE STRING "")



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


[clang] 8e4cd72 - [CMake] Update cache file for Win to ARM Linux cross toolchain builders. NFC.

2022-04-25 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2022-04-25T17:44:35-07:00
New Revision: 8e4cd7295cb56c2baa6fbed1b739ed974738c307

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

LOG: [CMake] Update cache file for Win to ARM Linux cross toolchain builders. 
NFC.

Use default test configuration file for the libunwind tests.

Added: 


Modified: 
clang/cmake/caches/CrossWinToARMLinux.cmake

Removed: 




diff  --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index 525432f9c861a..90af9d964345e 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -176,10 +176,6 @@ if(DEFINED REMOTE_TEST_HOST)
   set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_TARGET_INFO
   "${DEFAULT_TEST_TARGET_INFO}" CACHE STRING "")
   set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_EXECUTOR   
   "${DEFAULT_TEST_EXECUTOR}" CACHE STRING "")
 
-  #NOTE: temporary workaround to fix the remote execution for libunwind tests.
-  # https://reviews.llvm.org/D112082
-  set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_TEST_CONFIG
   "${LLVM_PROJECT_DIR}/libunwind/test/lit.site.cfg.in" CACHE PATH "")
-
   set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_TARGET_INFO
   "${DEFAULT_TEST_TARGET_INFO}" CACHE STRING "")
   set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_EXECUTOR   
   "${DEFAULT_TEST_EXECUTOR}" CACHE STRING "")
   set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_TARGET_INFO   
   "${DEFAULT_TEST_TARGET_INFO}" CACHE STRING "")



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


[libunwind] db92019 - [libunwind] Update the test configuration files to support the remote execution.

2022-04-25 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2022-04-25T17:33:03-07:00
New Revision: db92019ab97b9bb13a3287438c4a2fa3ba375756

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

LOG: [libunwind] Update the test configuration files to support the remote 
execution.

These changes allow remote execution for the libunwind library tests.

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

Added: 


Modified: 
libunwind/test/configs/llvm-libunwind-shared.cfg.in
libunwind/test/configs/llvm-libunwind-static.cfg.in

Removed: 




diff  --git a/libunwind/test/configs/llvm-libunwind-shared.cfg.in 
b/libunwind/test/configs/llvm-libunwind-shared.cfg.in
index 9de82e9d20fbc..c0a3e4d922be7 100644
--- a/libunwind/test/configs/llvm-libunwind-shared.cfg.in
+++ b/libunwind/test/configs/llvm-libunwind-shared.cfg.in
@@ -20,6 +20,7 @@ config.test_source_root = 
os.path.join('@LIBUNWIND_SOURCE_DIR@', 'test')
 config.test_format = libcxx.test.format.CxxStandardLibraryTest()
 config.recursiveExpansionLimit = 10
 config.test_exec_root = '@CMAKE_BINARY_DIR@'
+config.target_info = "@LIBUNWIND_TARGET_INFO@"
 
 compile_flags = []
 link_flags = []
@@ -39,9 +40,12 @@ if '@CMAKE_SYSTEM_NAME@' == 'Linux':
 # Stack unwinding tests need unwinding tables and these are not generated by 
default on all targets.
 compile_flags.append('-funwind-tables')
 
+config.substitutions.append(('%{executor}', '@LIBUNWIND_EXECUTOR@'))
+
 config.substitutions.append(('%{cxx}', '@CMAKE_CXX_COMPILER@'))
+local_sysroot = '@CMAKE_OSX_SYSROOT@' or '@CMAKE_SYSROOT@'
 config.substitutions.append(('%{flags}',
-'-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else 
''
+'-isysroot {}'.format(local_sysroot) if local_sysroot else ''
 ))
 config.substitutions.append(('%{compile_flags}',
 '-nostdinc++ -I {}/include {}'.format('@LIBUNWIND_SOURCE_DIR@', ' 
'.join(compile_flags))
@@ -49,7 +53,9 @@ config.substitutions.append(('%{compile_flags}',
 config.substitutions.append(('%{link_flags}',
 '-L {0} -Wl,-rpath,{0} -lunwind -ldl 
{1}'.format('@LIBUNWIND_LIBRARY_DIR@', ' '.join(link_flags))
 ))
-config.substitutions.append(('%{exec}', ''))
+config.substitutions.append(('%{exec}',
+'%{executor} --execdir %T -- ' if '@LIBUNWIND_EXECUTOR@' else ''
+))
 
 import os, site
 site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))

diff  --git a/libunwind/test/configs/llvm-libunwind-static.cfg.in 
b/libunwind/test/configs/llvm-libunwind-static.cfg.in
index 9382ad3f92a36..0bb4207307177 100644
--- a/libunwind/test/configs/llvm-libunwind-static.cfg.in
+++ b/libunwind/test/configs/llvm-libunwind-static.cfg.in
@@ -20,9 +20,11 @@ config.test_source_root = 
os.path.join('@LIBUNWIND_SOURCE_DIR@', 'test')
 config.test_format = libcxx.test.format.CxxStandardLibraryTest()
 config.recursiveExpansionLimit = 10
 config.test_exec_root = '@CMAKE_BINARY_DIR@'
+config.target_info = "@LIBUNWIND_TARGET_INFO@"
 
 compile_flags = []
 link_flags = []
+
 if @LIBUNWIND_USES_ARM_EHABI@:
 config.available_features.add('libunwind-arm-ehabi')
 
@@ -38,12 +40,17 @@ if @LIBUNWIND_ENABLE_CET@:
 if '@CMAKE_SYSTEM_NAME@' == 'Linux':
 link_flags.append('-Wl,--export-dynamic')
 
+
 # Stack unwinding tests need unwinding tables and these are not generated by 
default on all targets.
 compile_flags.append('-funwind-tables')
 
+config.substitutions.append(('%{executor}', '@LIBUNWIND_EXECUTOR@'))
+
 config.substitutions.append(('%{cxx}', '@CMAKE_CXX_COMPILER@'))
+
+local_sysroot = '@CMAKE_OSX_SYSROOT@' or '@CMAKE_SYSROOT@'
 config.substitutions.append(('%{flags}',
-'-isysroot {}'.format('@CMAKE_OSX_SYSROOT@') if '@CMAKE_OSX_SYSROOT@' else 
''
+'-isysroot {}'.format(local_sysroot) if local_sysroot else ''
 ))
 config.substitutions.append(('%{compile_flags}',
 '-nostdinc++ -I {}/include {}'.format('@LIBUNWIND_SOURCE_DIR@', ' 
'.join(compile_flags))
@@ -51,7 +58,9 @@ config.substitutions.append(('%{compile_flags}',
 config.substitutions.append(('%{link_flags}',
 '{}/libunwind.a -ldl {}'.format('@LIBUNWIND_LIBRARY_DIR@', ' 
'.join(link_flags))
 ))
-config.substitutions.append(('%{exec}', ''))
+config.substitutions.append(('%{exec}',
+'%{executor} --execdir %T -- ' if '@LIBUNWIND_EXECUTOR@' else ''
+))
 
 import os, site
 site.addsitedir(os.path.join('@LIBUNWIND_LIBCXX_PATH@', 'utils'))



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


[clang] 41f74bc - [CMake] Update cache file for Win to ARM Linux cross toolchain builders. NFC.

2022-03-18 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2022-03-18T21:39:02-07:00
New Revision: 41f74bc7ae33d9cd9a1eaacfc29ba53a933c042f

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

LOG: [CMake] Update cache file for Win to ARM Linux cross toolchain builders. 
NFC.

* fixed remote test script arguments for libc++/compiler-rt libraries.
* disabled shared libc++abi libraries (to let remote tests get passed).

Added: 


Modified: 
clang/cmake/caches/CrossWinToARMLinux.cmake

Removed: 




diff  --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index 63461ea2ddbe3..525432f9c861a 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -143,6 +143,7 @@ 
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_USE_COMPILER_RT
 
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS 
  OFF CACHE BOOL "")
 
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI
 OFF CACHE BOOL "")
 
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX 
  OFF CACHE BOOL "")
+set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXXABI_ENABLE_SHARED
   OFF CACHE BOOL "")
 
 
set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_LINK_TESTS_WITH_SHARED_LIBCXXABI 
  OFF CACHE BOOL "")
 set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBCXX_LINK_TESTS_WITH_SHARED_LIBCXX   
   OFF CACHE BOOL "")
@@ -162,14 +163,14 @@ find_package(Python3 COMPONENTS Interpreter)
 if(DEFINED REMOTE_TEST_HOST)
   # Allow override with the custom values.
   if(NOT DEFINED DEFAULT_TEST_EXECUTOR)
-set(DEFAULT_TEST_EXECUTOR "\\\"${Python3_EXECUTABLE}\\\" 
\\\"${LLVM_PROJECT_DIR}/libcxx/utils/ssh.py\\\" 
--host='${REMOTE_TEST_USER}@${REMOTE_TEST_HOST}'")
+set(DEFAULT_TEST_EXECUTOR "\\\"${Python3_EXECUTABLE}\\\" 
\\\"${LLVM_PROJECT_DIR}/libcxx/utils/ssh.py\\\" 
--host=${REMOTE_TEST_USER}@${REMOTE_TEST_HOST}")
   endif()
   if(NOT DEFINED DEFAULT_TEST_TARGET_INFO)
 set(DEFAULT_TEST_TARGET_INFO  
"libcxx.test.target_info.LinuxRemoteTI")
   endif()
 
   set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_COMPILER_RT_EMULATOR
-"\\\"${Python3_EXECUTABLE}\\\" 
\\\"${LLVM_PROJECT_DIR}/llvm/utils/remote-exec.py\\\" --execdir %%T 
--exec-pattern='.*\\.c.*\\.tmp.*' 
--host='${REMOTE_TEST_USER}@${REMOTE_TEST_HOST}'"
+"\\\"${Python3_EXECUTABLE}\\\" 
\\\"${LLVM_PROJECT_DIR}/llvm/utils/remote-exec.py\\\" --execdir %%T 
--exec-pattern='.*\\.c.*\\.tmp.*' 
--host=${REMOTE_TEST_USER}@${REMOTE_TEST_HOST}"
 CACHE STRING "")
 
   set(RUNTIMES_${TOOLCHAIN_TARGET_TRIPLE}_LIBUNWIND_TARGET_INFO
   "${DEFAULT_TEST_TARGET_INFO}" CACHE STRING "")



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


[clang] d860ac5 - [CMake] Replace `TARGET_TRIPLE` with `TOOLCHAIN_TARGET_TRIPLE` for Win-to-Arm cross toolchain cache file. NFC.

2022-03-04 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2022-03-04T16:39:28-08:00
New Revision: d860ac5da6d71dd759d347a3c7d5e63705443694

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

LOG: [CMake] Replace `TARGET_TRIPLE` with `TOOLCHAIN_TARGET_TRIPLE` for 
Win-to-Arm cross toolchain cache file. NFC.

Avoid using TARGET_TRIPLE argument for the cross toolchain cmake cache file and 
replace it
with TOOLCHAIN_TARGET_TRIPLE.

Reference: https://reviews.llvm.org/D119918

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

Added: 


Modified: 
clang/cmake/caches/CrossWinToARMLinux.cmake

Removed: 




diff  --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index 5e62d01b297c2..63461ea2ddbe3 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -10,7 +10,7 @@
 #
 # Configure:
 #  cmake -G Ninja ^
-#   -DTARGET_TRIPLE=armv7-unknown-linux-gnueabihf ^
+#   -DTOOLCHAIN_TARGET_TRIPLE=armv7-unknown-linux-gnueabihf ^
 #   -DCMAKE_INSTALL_PREFIX=../install ^
 #   -DDEFAULT_SYSROOT= ^
 #   -DLLVM_AR=/bin/llvm-ar[.exe] ^
@@ -25,10 +25,10 @@
 #  cmake --build . --target check-llvm
 #  cmake --build . --target check-clang
 #  cmake --build . --target check-lld
-#  cmake --build . --target check-compiler-rt-
-#  cmake --build . --target check-cxxabi-
-#  cmake --build . --target check-unwind-
-#  cmake --build . --target check-cxx-
+#  cmake --build . --target check-compiler-rt-
+#  cmake --build . --target check-cxxabi-
+#  cmake --build . --target check-unwind-
+#  cmake --build . --target check-cxx-
 
 # LLVM_PROJECT_DIR is the path to the llvm-project directory.
 # The right way to compute it would probably be to use 
"${CMAKE_SOURCE_DIR}/../",
@@ -55,40 +55,40 @@ if (NOT DEFINED LLVM_ENABLE_RUNTIMES)
   set(LLVM_ENABLE_RUNTIMES "compiler-rt;libunwind;libcxxabi;libcxx" CACHE 
STRING "")
 endif()
 
-if (NOT DEFINED TARGET_TRIPLE)
-  set(TARGET_TRIPLE "armv7-unknown-linux-gnueabihf")
+if (NOT DEFINED TOOLCHAIN_TARGET_TRIPLE)
+  set(TOOLCHAIN_TARGET_TRIPLE "armv7-unknown-linux-gnueabihf")
 else()
   #NOTE: we must normalize specified target triple to a fully specified triple,
   # including the vendor part. It is necessary to synchronize the runtime 
library
   # installation path and operable target triple by Clang to get a correct 
runtime
   # path through `-print-runtime-dir` Clang option.
-  string(REPLACE "-" ";" TARGET_TRIPLE "${TARGET_TRIPLE}")
-  list(LENGTH TARGET_TRIPLE TARGET_TRIPLE_LEN)
-  if (TARGET_TRIPLE_LEN LESS 3)
+  string(REPLACE "-" ";" TOOLCHAIN_TARGET_TRIPLE "${TOOLCHAIN_TARGET_TRIPLE}")
+  list(LENGTH TOOLCHAIN_TARGET_TRIPLE TOOLCHAIN_TARGET_TRIPLE_LEN)
+  if (TOOLCHAIN_TARGET_TRIPLE_LEN LESS 3)
 message(FATAL_ERROR "invalid target triple")
   endif()
   # We suppose missed vendor's part.
-  if (TARGET_TRIPLE_LEN LESS 4)
-list(INSERT TARGET_TRIPLE 1 "unknown")
+  if (TOOLCHAIN_TARGET_TRIPLE_LEN LESS 4)
+list(INSERT TOOLCHAIN_TARGET_TRIPLE 1 "unknown")
   endif()
-  string(REPLACE ";" "-" TARGET_TRIPLE "${TARGET_TRIPLE}")
+  string(REPLACE ";" "-" TOOLCHAIN_TARGET_TRIPLE "${TOOLCHAIN_TARGET_TRIPLE}")
 endif()
 
 if (NOT DEFINED CMAKE_BUILD_TYPE)
   set(CMAKE_BUILD_TYPE "Release" CACHE STRING "")
 endif()
 
-message(STATUS "Toolchain target triple: ${TARGET_TRIPLE}")
+message(STATUS "Toolchain target triple: ${TOOLCHAIN_TARGET_TRIPLE}")
 
 set(CMAKE_CROSSCOMPILINGON CACHE BOOL "")
 set(CMAKE_CL_SHOWINCLUDES_PREFIX"Note: including file: " CACHE 
STRING "")
 # Required if COMPILER_RT_DEFAULT_TARGET_ONLY is ON
-set(CMAKE_C_COMPILER_TARGET "${TARGET_TRIPLE}" CACHE STRING "")
-set(CMAKE_CXX_COMPILER_TARGET   "${TARGET_TRIPLE}" CACHE STRING "")
+set(CMAKE_C_COMPILER_TARGET "${TOOLCHAIN_TARGET_TRIPLE}" CACHE 
STRING "")
+set(CMAKE_CXX_COMPILER_TARGET   "${TOOLCHAIN_TARGET_TRIPLE}" CACHE 
STRING "")
 
 set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR  ON CACHE BOOL "")
-set(LLVM_DEFAULT_TARGET_TRIPLE  "${TARGET_TRIPLE}" CACHE STRING "")
-set(LLVM_TARGET_ARCH"${TARGET_TRIPLE}" CACHE STRING "")
+set(LLVM_DEFAULT_TARGET_TRIPLE  "${TOOLCHAIN_TARGET_TRIPLE}" CACHE 
STRING "")
+set(LLVM_TARGET_ARCH"${TOOLCHAIN_TARGET_TRIPLE}" CACHE 
STRING "")
 set(LLVM_LIT_ARGS   "-vv ${LLVM_LIT_ARGS}" CACHE 
STRING "" FORCE)
 
 set(CLANG_DEFAULT_LINKER"lld" CACHE STRING "")
@@ -104,56 +104,56 @@ if (NOT DEFINED RUNTIMES_INSTALL_RPATH)
   set(RUNTIMES_INSTALL_RPATH
"\$ORIGIN/../lib;${CMAKE_INSTALL_PREFIX}/lib")
 endif()
 
-set(LLVM_BUILTIN_TARGETS

[clang] 19c1b08 - [CMake] Update cache file for Win to ARM cross tooolchain. NFC.

2022-03-03 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2022-03-03T14:32:16-08:00
New Revision: 19c1b084a7da9087fcdc16071b461ea33b6a68b4

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

LOG: [CMake] Update cache file for Win to ARM cross tooolchain. NFC.

Removed passing CMAKE_AR from the library configurations.

Added: 


Modified: 
clang/cmake/caches/CrossWinToARMLinux.cmake

Removed: 




diff  --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index 5165992b7b923..5e62d01b297c2 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -42,9 +42,6 @@ if (NOT DEFINED DEFAULT_SYSROOT)
   message(WARNING "DEFAULT_SYSROOT must be specified for the cross toolchain 
build.")
 endif()
 
-if (DEFINED LLVM_AR)
-  set(CMAKE_AR "${LLVM_AR}" CACHE STRING "")
-endif()
 if (NOT DEFINED LLVM_TARGETS_TO_BUILD)
   set(LLVM_TARGETS_TO_BUILD "ARM" CACHE STRING "")
 endif()
@@ -111,7 +108,6 @@ set(LLVM_BUILTIN_TARGETS
"${TARGET_TRIPLE}" CACHE STRING "")
 
 set(BUILTINS_${TARGET_TRIPLE}_CMAKE_SYSTEM_NAME 
"Linux" CACHE STRING "")
 set(BUILTINS_${TARGET_TRIPLE}_CMAKE_SYSROOT 
"${DEFAULT_SYSROOT}"  CACHE STRING "")
-set(BUILTINS_${TARGET_TRIPLE}_CMAKE_AR  
"${CMAKE_AR}"  CACHE STRING "")
 set(BUILTINS_${TARGET_TRIPLE}_CMAKE_INSTALL_RPATH   
"${RUNTIMES_INSTALL_RPATH}"  CACHE STRING "")
 set(BUILTINS_${TARGET_TRIPLE}_CMAKE_BUILD_WITH_INSTALL_RPATHON  
CACHE BOOL "")
 
@@ -122,7 +118,6 @@ set(RUNTIMES_${TARGET_TRIPLE}_LLVM_ENABLE_RUNTIMES  
"${LLVM_
 
 set(RUNTIMES_${TARGET_TRIPLE}_CMAKE_SYSTEM_NAME 
"Linux" CACHE STRING "")
 set(RUNTIMES_${TARGET_TRIPLE}_CMAKE_SYSROOT 
"${DEFAULT_SYSROOT}"  CACHE STRING "")
-set(RUNTIMES_${TARGET_TRIPLE}_CMAKE_AR  
"${CMAKE_AR}"  CACHE STRING "")
 set(RUNTIMES_${TARGET_TRIPLE}_CMAKE_INSTALL_RPATH   
"${RUNTIMES_INSTALL_RPATH}"  CACHE STRING "")
 set(RUNTIMES_${TARGET_TRIPLE}_CMAKE_BUILD_WITH_INSTALL_RPATHON  
CACHE BOOL "")
 



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


[clang] 18fa0b1 - [CMake] Use CMAKE_SYSROOT to build libs for Win to ARM cross tooolchain. NFC.

2022-02-23 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2022-02-23T15:16:56-08:00
New Revision: 18fa0b15ccf610f34af1231440f89d20cb99e7a0

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

LOG: [CMake] Use CMAKE_SYSROOT to build libs for Win to ARM cross tooolchain. 
NFC.

Provide CMAKE_SYSROOT for the libc++/libc++abi/libunwind libraries
instead of specific _SYSROOT for each of them.

Fixed passing some CMake arguments for the runtimes.

Referenced Differentials:
 * https://reviews.llvm.org/D119836
 * https://reviews.llvm.org/D112155
 * https://reviews.llvm.org/D111672

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

Added: 


Modified: 
clang/cmake/caches/CrossWinToARMLinux.cmake

Removed: 




diff  --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index dd03a37b4b8f9..5165992b7b923 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -10,7 +10,7 @@
 #
 # Configure:
 #  cmake -G Ninja ^
-#   -DTARGET_TRIPLE=armv7-linux-gnueabihf ^
+#   -DTARGET_TRIPLE=armv7-unknown-linux-gnueabihf ^
 #   -DCMAKE_INSTALL_PREFIX=../install ^
 #   -DDEFAULT_SYSROOT= ^
 #   -DLLVM_AR=/bin/llvm-ar[.exe] ^
@@ -25,10 +25,10 @@
 #  cmake --build . --target check-llvm
 #  cmake --build . --target check-clang
 #  cmake --build . --target check-lld
-#  cmake --build . --target check-compiler-rt
-#  cmake --build . --target check-cxxabi
-#  cmake --build . --target check-unwind
-#  cmake --build . --target check-cxx
+#  cmake --build . --target check-compiler-rt-
+#  cmake --build . --target check-cxxabi-
+#  cmake --build . --target check-unwind-
+#  cmake --build . --target check-cxx-
 
 # LLVM_PROJECT_DIR is the path to the llvm-project directory.
 # The right way to compute it would probably be to use 
"${CMAKE_SOURCE_DIR}/../",
@@ -86,49 +86,20 @@ message(STATUS "Toolchain target triple: ${TARGET_TRIPLE}")
 set(CMAKE_CROSSCOMPILINGON CACHE BOOL "")
 set(CMAKE_CL_SHOWINCLUDES_PREFIX"Note: including file: " CACHE 
STRING "")
 # Required if COMPILER_RT_DEFAULT_TARGET_ONLY is ON
-set(CMAKE_C_COMPILER_TARGET "${TARGET_TRIPLE}" CACHE STRING "")
+set(CMAKE_C_COMPILER_TARGET "${TARGET_TRIPLE}" CACHE STRING "")
+set(CMAKE_CXX_COMPILER_TARGET   "${TARGET_TRIPLE}" CACHE STRING "")
 
-set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIRON CACHE BOOL "")
+set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR  ON CACHE BOOL "")
 set(LLVM_DEFAULT_TARGET_TRIPLE  "${TARGET_TRIPLE}" CACHE STRING "")
 set(LLVM_TARGET_ARCH"${TARGET_TRIPLE}" CACHE STRING "")
 set(LLVM_LIT_ARGS   "-vv ${LLVM_LIT_ARGS}" CACHE 
STRING "" FORCE)
 
 set(CLANG_DEFAULT_LINKER"lld" CACHE STRING "")
 
-set(COMPILER_RT_BUILD_BUILTINS  ON CACHE BOOL "")
-set(COMPILER_RT_BUILD_SANITIZERSOFF CACHE BOOL "")
-set(COMPILER_RT_BUILD_XRAY  OFF CACHE BOOL "")
-set(COMPILER_RT_BUILD_LIBFUZZER OFF CACHE BOOL "")
-set(COMPILER_RT_BUILD_PROFILE   OFF CACHE BOOL "")
-set(COMPILER_RT_BUILD_CRT   OFF CACHE BOOL "")
-set(COMPILER_RT_BUILD_ORC   OFF CACHE BOOL "")
-set(COMPILER_RT_DEFAULT_TARGET_ONLY ON CACHE BOOL "")
-set(COMPILER_RT_INCLUDE_TESTS   ON CACHE BOOL "")
-
-set(LIBUNWIND_USE_COMPILER_RT   ON CACHE BOOL "")
-set(LIBUNWIND_TARGET_TRIPLE "${TARGET_TRIPLE}" CACHE STRING "")
-set(LIBUNWIND_SYSROOT   "${DEFAULT_SYSROOT}" CACHE STRING 
"")
-set(LIBUNWIND_ENABLE_SHARED OFF CACHE BOOL "")
-
-set(LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "")
-set(LIBCXXABI_ENABLE_STATIC_UNWINDERON CACHE BOOL "")
-set(LIBCXXABI_USE_COMPILER_RT   ON CACHE BOOL "")
-set(LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "")
-set(LIBCXXABI_TARGET_TRIPLE "${TARGET_TRIPLE}" CACHE STRING "")
-set(LIBCXXABI_SYSROOT   "${DEFAULT_SYSROOT}" CACHE STRING 
"")
-set(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI OFF CACHE BOOL "")
-set(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXOFF CACHE BOOL "")
-set(LIBCXX_LINK_TESTS_WITH_SHARED_LIBCXXABIOFF CACHE BOOL "")
-set(LIBCXX_LINK_TESTS_WITH_SHARED_LIBCXX   OFF CACHE BOOL "")
-
-set(LIBCXX_USE_COMPILER_RT  ON CACHE BOOL "")
-set(LIBCXX_TARGET_TRIPLE"${TARGET_TRIPLE}" CACHE STRING "")
-set(LIBCXX_SYSROOT  "${DEFAULT_SYSROOT}" CACHE STRING 
"")
-set(LIBCXX_ENABLE_SHAREDOFF CACHE BOOL "")
-set(LIBCXX_CXX_ABI  "libcxxabi" CACHE STRING "")

[clang] efa5cad - [CMake] Update Cmake cache file for Win to ARM Linux cross builds. NFC

2021-10-29 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2021-10-29T18:55:49-07:00
New Revision: efa5cadcf7127558660a625766fd2f0fe417e98e

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

LOG: [CMake] Update Cmake cache file for Win to ARM Linux cross builds. NFC

Workaround to fix broken remote execution for the libunwind tests.

https://reviews.llvm.org/D112082

Added: 


Modified: 
clang/cmake/caches/CrossWinToARMLinux.cmake

Removed: 




diff  --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index 63b49bc569ed0..f015c67e3b9ce 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -86,9 +86,9 @@ message(STATUS "Toolchain target triple: ${TARGET_TRIPLE}")
 set(CMAKE_CROSSCOMPILINGON CACHE BOOL "")
 set(CMAKE_CL_SHOWINCLUDES_PREFIX"Note: including file: " CACHE 
STRING "")
 # Required if COMPILER_RT_DEFAULT_TARGET_ONLY is ON
-set(CMAKE_C_COMPILER_TARGET"${TARGET_TRIPLE}" 
CACHE STRING "")
+set(CMAKE_C_COMPILER_TARGET "${TARGET_TRIPLE}" CACHE STRING "")
 
-set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "")
+set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIRON CACHE BOOL "")
 set(LLVM_DEFAULT_TARGET_TRIPLE  "${TARGET_TRIPLE}" CACHE STRING "")
 set(LLVM_TARGET_ARCH"${TARGET_TRIPLE}" CACHE STRING "")
 set(LLVM_LIT_ARGS   "-vv ${LLVM_LIT_ARGS}" CACHE 
STRING "" FORCE)
@@ -156,6 +156,9 @@ if(DEFINED REMOTE_TEST_HOST)
   if(NOT DEFINED LIBUNWIND_EXECUTOR)
 set(LIBUNWIND_EXECUTOR  "${DEFAULT_TEST_EXECUTOR}" CACHE 
STRING "")
   endif()
+  #NOTE: temporary workaround to fix the remote execution for libunwind tests.
+  # https://reviews.llvm.org/D112082
+  set(LIBUNWIND_TEST_CONFIG 
"${LLVM_PROJECT_DIR}/libunwind/test/lit.site.cfg.in" CACHE PATH "")  
   if(NOT DEFINED LIBCXXABI_TARGET_INFO)
 set(LIBCXXABI_TARGET_INFO   "${DEFAULT_TEST_TARGET_INFO}" 
CACHE STRING "")
   endif()



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


[clang] b5a80a0 - [CMake] Update Cmake cache file for Win to ARM Linux cross builds. NFC

2021-05-18 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2021-05-18T20:29:16-07:00
New Revision: b5a80a0f370ca218d935991fe2bec0d19ca3ba51

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

LOG: [CMake] Update Cmake cache file for Win to ARM Linux cross builds. NFC

Parametrize the cache file with TARGET_TRIPLE parameter. Normalize
the target triple to follow the runtime library installation directory.

Explicity enable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR option.

Added: 


Modified: 
clang/cmake/caches/CrossWinToARMLinux.cmake

Removed: 




diff  --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index 8f45603058b9..778494ee9f10 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -10,6 +10,7 @@
 #
 # Configure:
 #  cmake -G Ninja ^
+#   -DTARGET_TRIPLE=armv7-linux-gnueabihf ^
 #   -DCMAKE_INSTALL_PREFIX=../install ^
 #   -DDEFAULT_SYSROOT= ^
 #   -DLLVM_AR=/bin/llvm-ar[.exe] ^
@@ -20,10 +21,14 @@
 #   /llvm-project/llvm
 # Build:
 #  cmake --build . --target install
-# Test:
+# Tests:
 #  cmake --build . --target check-llvm
 #  cmake --build . --target check-clang
 #  cmake --build . --target check-lld
+#  cmake --build . --target check-compiler-rt
+#  cmake --build . --target check-cxxabi
+#  cmake --build . --target check-unwind
+#  cmake --build . --target check-cxx
 
 # LLVM_PROJECT_DIR is the path to the llvm-project directory.
 # The right way to compute it would probably be to use 
"${CMAKE_SOURCE_DIR}/../",
@@ -40,28 +45,52 @@ endif()
 if (DEFINED LLVM_AR)
   set(CMAKE_AR "${LLVM_AR}" CACHE STRING "")
 endif()
-
 if (NOT DEFINED LLVM_TARGETS_TO_BUILD)
   set(LLVM_TARGETS_TO_BUILD "ARM" CACHE STRING "")
 endif()
+if (NOT DEFINED LLVM_ENABLE_ASSERTIONS)
+  set(LLVM_ENABLE_ASSERTIONS ON CACHE BOOL "")
+endif()
+if (NOT DEFINED LLVM_ENABLE_PROJECTS)
+  set(LLVM_ENABLE_PROJECTS "clang;clang-tools-extra;lld" CACHE STRING "")
+endif()
+if (NOT DEFINED LLVM_ENABLE_RUNTIMES)
+  set(LLVM_ENABLE_RUNTIMES "compiler-rt;libunwind;libcxxabi;libcxx" CACHE 
STRING "")
+endif()
 
-if (NOT DEFINED CMAKE_C_COMPILER_TARGET)
-  # Required if COMPILER_RT_DEFAULT_TARGET_ONLY is ON
-  set(CMAKE_C_COMPILER_TARGET "armv7-linux-gnueabihf" CACHE STRING "")
+if (NOT DEFINED TARGET_TRIPLE)
+  set(TARGET_TRIPLE "armv7-unknown-linux-gnueabihf")
+else()
+  #NOTE: we must normalize specified target triple to a fully specified triple,
+  # including the vendor part. It is necessary to synchronize the runtime 
library
+  # installation path and operable target triple by Clang to get a correct 
runtime
+  # path through `-print-runtime-dir` Clang option.
+  string(REPLACE "-" ";" TARGET_TRIPLE "${TARGET_TRIPLE}")
+  list(LENGTH TARGET_TRIPLE TARGET_TRIPLE_LEN)
+  if (TARGET_TRIPLE_LEN LESS 3)
+message(FATAL_ERROR "invalid target triple")
+  endif()
+  # We suppose missed vendor's part.
+  if (TARGET_TRIPLE_LEN LESS 4)
+list(INSERT TARGET_TRIPLE 1 "unknown")
+  endif()
+  string(REPLACE ";" "-" TARGET_TRIPLE "${TARGET_TRIPLE}")
 endif()
 
 if (NOT DEFINED CMAKE_BUILD_TYPE)
   set(CMAKE_BUILD_TYPE "Release" CACHE STRING "")
 endif()
 
+message(STATUS "Toolchain target triple: ${TARGET_TRIPLE}")
+
 set(CMAKE_CROSSCOMPILINGON CACHE BOOL "")
 set(CMAKE_CL_SHOWINCLUDES_PREFIX"Note: including file: " CACHE 
STRING "")
+# Required if COMPILER_RT_DEFAULT_TARGET_ONLY is ON
+set(CMAKE_C_COMPILER_TARGET"${TARGET_TRIPLE}" 
CACHE STRING "")
 
-set(LLVM_ENABLE_ASSERTIONS  ON CACHE BOOL "")
-set(LLVM_ENABLE_PROJECTS"clang;clang-tools-extra;lld" 
CACHE STRING "")
-set(LLVM_ENABLE_RUNTIMES
"compiler-rt;libunwind;libcxxabi;libcxx" CACHE STRING "")
-set(LLVM_DEFAULT_TARGET_TRIPLE  "${CMAKE_C_COMPILER_TARGET}" CACHE 
STRING "")
-set(LLVM_TARGET_ARCH"${CMAKE_C_COMPILER_TARGET}" CACHE 
STRING "")
+set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR ON CACHE BOOL "")
+set(LLVM_DEFAULT_TARGET_TRIPLE  "${TARGET_TRIPLE}" CACHE STRING "")
+set(LLVM_TARGET_ARCH"${TARGET_TRIPLE}" CACHE STRING "")
 set(LLVM_LIT_ARGS   "-vv ${LLVM_LIT_ARGS}" CACHE 
STRING "" FORCE)
 
 set(CLANG_DEFAULT_LINKER"lld" CACHE STRING "")
@@ -76,7 +105,7 @@ set(COMPILER_RT_DEFAULT_TARGET_ONLY ON CACHE BOOL "")
 set(COMPILER_RT_INCLUDE_TESTS   ON CACHE BOOL "")
 
 set(LIBUNWIND_USE_COMPILER_RT   ON CACHE BOOL "")
-set(LIBUNWIND_TARGET_TRIPLE "${CMAKE_C_COMPILER_TARGET}" CACHE 
STRING "")
+set(LIBUNWIND_TARGET_TRIPLE "${TARGET_TRIPLE}" CACHE STRING "")
 

[clang] 74d9a76 - [CMake] Stop using c++ subdirectory for libc++ on Win to ARM Linux cross builds. NFC

2021-04-29 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2021-04-29T14:23:33-07:00
New Revision: 74d9a76ad3f55c16982ceaa8b6b4a6b7744109b1

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

LOG: [CMake] Stop using c++ subdirectory for libc++ on Win to ARM Linux cross 
builds. NFC

Updated cross Win-x-ARM Linux toolchain cmake cache file in according of
the following changes: https://reviews.llvm.org/D100869

Stop using use c++ subdirectory for libc++ library

Added: 


Modified: 
clang/cmake/caches/CrossWinToARMLinux.cmake

Removed: 




diff  --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index b5781a74498b..8f45603058b9 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -97,7 +97,7 @@ set(LIBCXX_SYSROOT  
"${DEFAULT_SYSROOT}" CACHE STRING ""
 set(LIBCXX_ENABLE_SHAREDOFF CACHE BOOL "")
 set(LIBCXX_CXX_ABI  "libcxxabi" CACHE STRING "")
 set(LIBCXX_CXX_ABI_INCLUDE_PATHS
"${LLVM_PROJECT_DIR}/libcxxabi/include" CACHE PATH "")
-set(LIBCXX_CXX_ABI_LIBRARY_PATH 
"${CMAKE_BINARY_DIR}/lib/${LIBCXX_TARGET_TRIPLE}/c++" CACHE PATH "")
+set(LIBCXX_CXX_ABI_LIBRARY_PATH 
"${CMAKE_BINARY_DIR}/lib/${LIBCXX_TARGET_TRIPLE}" CACHE PATH "")
 set(LIBCXX_ENABLE_NEW_DELETE_DEFINITIONSON CACHE BOOL "")
 
 # Set up RPATH for the target runtime/builtin libraries.



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


[clang] 155c49e - [Driver] Print process statistics report on CC_PRINT_PROC_STAT env variable.

2021-02-26 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2021-02-26T16:16:00-08:00
New Revision: 155c49e0878de667b8021b9ba685390151dee11e

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

LOG: [Driver] Print process statistics report on CC_PRINT_PROC_STAT env 
variable.

Added supporting CC_PRINT_PROC_STAT and CC_PRINT_PROC_STAT_FILE
environment variables to trigger clang driver reporting the process
statistics into specified file (alternate for -fproc-stat-report
option).

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

Added: 
clang/test/Driver/cc-print-proc-stat.c

Modified: 
clang/docs/UsersManual.rst
clang/include/clang/Driver/Driver.h
clang/lib/Driver/Driver.cpp
clang/test/Driver/lit.local.cfg
clang/tools/driver/driver.cpp

Removed: 




diff  --git a/clang/docs/UsersManual.rst b/clang/docs/UsersManual.rst
index 6f593cab8f1a..b762bf9a542b 100644
--- a/clang/docs/UsersManual.rst
+++ b/clang/docs/UsersManual.rst
@@ -764,12 +764,12 @@ compilations steps.
   is sent to. If it specifies a regular file, the data are saved to this file 
in
   CSV format:
 
-.. code-block:: console
+  .. code-block:: console
 
-   $ clang -fproc-stat-report=abc foo.c
-   $ cat abc
-   clang-11,"/tmp/foo-123456.o",92000,84000,87536
-   ld,"a.out",900,8000,53568
+$ clang -fproc-stat-report=abc foo.c
+$ cat abc
+clang-11,"/tmp/foo-123456.o",92000,84000,87536
+ld,"a.out",900,8000,53568
 
   The data on each row represent:
   
@@ -780,19 +780,38 @@ compilations steps.
   * peak memory usage in Kb.
   
   It is possible to specify this option without any value. In this case 
statistics
-  is printed on standard output in human readable format:
+  are printed on standard output in human readable format:
   
-.. code-block:: console
+  .. code-block:: console
 
-  $ clang -fproc-stat-report foo.c
-  clang-11: output=/tmp/foo-855a8e.o, total=68.000 ms, user=60.000 ms, 
mem=86920 Kb
-  ld: output=a.out, total=8.000 ms, user=4.000 ms, mem=52320 Kb
+$ clang -fproc-stat-report foo.c
+clang-11: output=/tmp/foo-855a8e.o, total=68.000 ms, user=60.000 ms, 
mem=86920 Kb
+ld: output=a.out, total=8.000 ms, user=4.000 ms, mem=52320 Kb
   
   The report file specified in the option is locked for write, so this option
   can be used to collect statistics in parallel builds. The report file is not
   cleared, new data is appended to it, thus making posible to accumulate build
   statistics.
 
+  You can also use environment variables to control the process statistics 
reporting.
+  Setting ``CC_PRINT_PROC_STAT`` to ``1`` enables the feature, the report goes 
to
+  stdout in human readable format.
+  Setting ``CC_PRINT_PROC_STAT_FILE`` to a fully qualified file path makes it 
report
+  process statistics to the given file in the CSV format. Specifying a relative
+  path will likely lead to multiple files with the same name created in 
diff erent
+  directories, since the path is relative to a changing working directory.
+
+  These environment variables are handy when you need to request the statistics
+  report without changing your build scripts or alter the existing set of 
compiler
+  options. Note that ``-fproc-stat-report`` take precedence over 
``CC_PRINT_PROC_STAT``
+  and ``CC_PRINT_PROC_STAT_FILE``.
+
+  .. code-block:: console
+
+$ export CC_PRINT_PROC_STAT=1
+$ export CC_PRINT_PROC_STAT_FILE=~/project-build-proc-stat.csv
+$ make
+
 Other Options
 -
 Clang options that don't fit neatly into other categories.

diff  --git a/clang/include/clang/Driver/Driver.h 
b/clang/include/clang/Driver/Driver.h
index 74a9cf3dab81..54c20620910b 100644
--- a/clang/include/clang/Driver/Driver.h
+++ b/clang/include/clang/Driver/Driver.h
@@ -156,6 +156,9 @@ class Driver {
   /// Information about the host which can be overridden by the user.
   std::string HostBits, HostMachine, HostSystem, HostRelease;
 
+  /// The file to log CC_PRINT_PROC_STAT_FILE output to, if enabled.
+  const char *CCPrintStatReportFilename;
+
   /// The file to log CC_PRINT_OPTIONS output to, if enabled.
   const char *CCPrintOptionsFilename;
 
@@ -204,6 +207,10 @@ class Driver {
   /// Whether the driver is generating diagnostics for debugging purposes.
   unsigned CCGenDiagnostics : 1;
 
+  /// Set CC_PRINT_PROC_STAT mode, which causes the driver to dump
+  /// performance report to CC_PRINT_PROC_STAT_FILE or to stdout.
+  unsigned CCPrintProcessStats : 1;
+
   /// Pointer to the ExecuteCC1Tool function, if available.
   /// When the clangDriver lib is used through clang.exe, this provides a
   /// shortcut for executing the -cc1 command-line directly, in the same

diff  --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 84bee2ae9d07..acea40f05182 100644
--- 

[clang] b09154e - [CMake] Explicity set up RPATH for the runtime libs on Win to ARM Linux cross builds.

2020-11-13 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2020-11-13T14:32:35-08:00
New Revision: b09154ebf95f3120414487ff7388e77393eb58c2

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

LOG: [CMake] Explicity set up RPATH for the runtime libs on Win to ARM Linux 
cross builds.

Since RPATH initialization was disabled for the runtime libraries to
avoid overwriting RPATH unconditionally we need to explicity set up it
for the Win to Arm Linux cross builds.

See some details here: https://reviews.llvm.org/D91099

Added: 


Modified: 
clang/cmake/caches/CrossWinToARMLinux.cmake

Removed: 




diff  --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index 67d49f4e52ec..b5781a74498b 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -100,8 +100,14 @@ set(LIBCXX_CXX_ABI_INCLUDE_PATHS
"${LLVM_PROJECT_DIR}/libcxxabi/inclu
 set(LIBCXX_CXX_ABI_LIBRARY_PATH 
"${CMAKE_BINARY_DIR}/lib/${LIBCXX_TARGET_TRIPLE}/c++" CACHE PATH "")
 set(LIBCXX_ENABLE_NEW_DELETE_DEFINITIONSON CACHE BOOL "")
 
-set(BUILTINS_CMAKE_ARGS 
"-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR}" CACHE STRING "")
-set(RUNTIMES_CMAKE_ARGS 
"-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR}" CACHE STRING "")
+# Set up RPATH for the target runtime/builtin libraries.
+# See some details here: https://reviews.llvm.org/D91099
+if (NOT DEFINED RUNTIMES_INSTALL_RPATH)
+  set(RUNTIMES_INSTALL_RPATH
"\$ORIGIN/../lib;${CMAKE_INSTALL_PREFIX}/lib")
+endif()
+
+set(BUILTINS_CMAKE_ARGS 
"-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR};-DCMAKE_INSTALL_RPATH=${RUNTIMES_INSTALL_RPATH};-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON"
 CACHE STRING "")
+set(RUNTIMES_CMAKE_ARGS 
"-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR};-DCMAKE_INSTALL_RPATH=${RUNTIMES_INSTALL_RPATH};-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON"
 CACHE STRING "")
 
 find_package(Python3 COMPONENTS Interpreter)
 



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


[clang] f8d87ce - [CMake] Use 'ssh.py' executor to run the remote library tests.

2020-06-12 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2020-06-12T12:31:59-07:00
New Revision: f8d87ce9ca23a696dbcc52b4b3458272a2ba8091

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

LOG: [CMake] Use 'ssh.py' executor to run the remote library tests.

In order to support the libcxx new format changes SSHExecutor was
replaced with ssh.py script in the following way:

LIBxxx_EXECUTOR="/libcxx/utils/ssh.py --host @"

See 96e6cbbf941d0f937b7e823433d4c222967a1817 commit for details.

Added: 


Modified: 
clang/cmake/caches/CrossWinToARMLinux.cmake

Removed: 




diff  --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index 3d1e961ada8d..41ddb836f60e 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -102,7 +102,7 @@ set(RUNTIMES_CMAKE_ARGS 
"-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_A
 
 # Remote test configuration.
 if(DEFINED REMOTE_TEST_HOST)
-  set(DEFAULT_TEST_EXECUTOR 
"SSHExecutor('${REMOTE_TEST_HOST}', '${REMOTE_TEST_USER}')")
+  set(DEFAULT_TEST_EXECUTOR 
"${LLVM_PROJECT_DIR}/libcxx/utils/ssh.py 
--host='${REMOTE_TEST_USER}@${REMOTE_TEST_HOST}'")
   set(DEFAULT_TEST_TARGET_INFO  
"libcxx.test.target_info.LinuxRemoteTI")
 
   # Allow override with the custom values.



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


[clang] 828fe79 - Revert "Temporarily re-apply https://reviews.llvm.org/D74347"

2020-03-11 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2020-03-11T15:00:56-07:00
New Revision: 828fe7916f91fb7aed5e711bfeb1a30ad197a2c3

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

LOG: Revert "Temporarily re-apply https://reviews.llvm.org/D74347;

This reverts commit 0197eac3330c04a49519f3e4dac38c4de605c654.

The changes break Armv7/Aarch64 toolchain builders:
* http://lab.llvm.org:8011/builders/llvm-clang-win-x-armv7l/builds/5570
* http://lab.llvm.org:8011/builders/llvm-clang-win-x-aarch64/builds/5600

Added: 


Modified: 
clang/cmake/caches/CrossWinToARMLinux.cmake

Removed: 




diff  --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index 7a6af734f0de..50957b153328 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -83,9 +83,6 @@ set(LIBCXX_USE_COMPILER_RT  ON CACHE BOOL "")
 set(LIBCXX_TARGET_TRIPLE"${CMAKE_C_COMPILER_TARGET}" CACHE 
STRING "")
 set(LIBCXX_SYSROOT  "${DEFAULT_SYSROOT}" CACHE STRING 
"")
 set(LIBCXX_ENABLE_SHAREDOFF CACHE BOOL "")
-set(LIBCXX_CXX_ABI  "libcxxabi" CACHE STRING "")
-set(LIBCXX_CXX_ABI_INCLUDE_PATHS
"${CMAKE_SOURCE_DIR}/../libcxxabi/include" CACHE PATH "")
-set(LIBCXX_CXX_ABI_LIBRARY_PATH 
"${CMAKE_BINARY_DIR}/lib/${CMAKE_C_COMPILER_TARGET}/c++" CACHE PATH "")
 
 set(BUILTINS_CMAKE_ARGS 
"-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR}" CACHE STRING "")
 set(RUNTIMES_CMAKE_ARGS 
"-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR}" CACHE STRING "")



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


[clang] 89e43f0 - Revert "List implicit operator== after implicit destructors in a vtable."

2020-01-21 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2020-01-21T13:07:56-08:00
New Revision: 89e43f04ba87a0da6e94863db149669c7536486b

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

LOG: Revert "List implicit operator== after implicit destructors in a vtable."

This reverts commit add2b7e44ada46f30715b5c48823a9e9e317e0c3.

Failed "Clang::virtual-compare.cpp" test on the arm builders.
See
http://lab.llvm.org:8011/builders/llvm-clang-win-x-armv7l/builds/3169
for details.

Added: 


Modified: 
clang/lib/AST/VTableBuilder.cpp

Removed: 
clang/test/CodeGenCXX/virtual-compare.cpp



diff  --git a/clang/lib/AST/VTableBuilder.cpp b/clang/lib/AST/VTableBuilder.cpp
index 0bff976905fc..2b5b74be5961 100644
--- a/clang/lib/AST/VTableBuilder.cpp
+++ b/clang/lib/AST/VTableBuilder.cpp
@@ -1474,11 +1474,11 @@ void ItaniumVTableBuilder::AddMethods(
   llvm_unreachable("Found a duplicate primary base!");
   }
 
+  const CXXDestructorDecl *ImplicitVirtualDtor = nullptr;
+
   typedef llvm::SmallVector NewVirtualFunctionsTy;
   NewVirtualFunctionsTy NewVirtualFunctions;
 
-  llvm::SmallVector NewImplicitVirtualFunctions;
-
   // Now go through all virtual member functions and add them.
   for (const auto *MD : RD->methods()) {
 if (!MD->isVirtual())
@@ -1542,30 +1542,24 @@ void ItaniumVTableBuilder::AddMethods(
   }
 }
 
-if (MD->isImplicit())
-  NewImplicitVirtualFunctions.push_back(MD);
-else
-  NewVirtualFunctions.push_back(MD);
-  }
-
-  std::stable_sort(
-  NewImplicitVirtualFunctions.begin(), NewImplicitVirtualFunctions.end(),
-  [](const CXXMethodDecl *A, const CXXMethodDecl *B) {
-if (A->isCopyAssignmentOperator() != B->isCopyAssignmentOperator())
-  return A->isCopyAssignmentOperator();
-if (A->isMoveAssignmentOperator() != B->isMoveAssignmentOperator())
-  return A->isMoveAssignmentOperator();
-if (isa(A) != isa(B))
-  return isa(A);
-assert(A->getOverloadedOperator() == OO_EqualEqual &&
-   B->getOverloadedOperator() == OO_EqualEqual &&
-   "unexpected or duplicate implicit virtual function");
-// We rely on Sema to have declared the operator== members in the
-// same order as the corresponding operator<=> members.
-return false;
-  });
-  NewVirtualFunctions.append(NewImplicitVirtualFunctions.begin(),
- NewImplicitVirtualFunctions.end());
+if (const CXXDestructorDecl *DD = dyn_cast(MD)) {
+  if (MD->isImplicit()) {
+// Itanium C++ ABI 2.5.2:
+//   If a class has an implicitly-defined virtual destructor,
+//   its entries come after the declared virtual function pointers.
+
+assert(!ImplicitVirtualDtor &&
+   "Did already see an implicit virtual dtor!");
+ImplicitVirtualDtor = DD;
+continue;
+  }
+}
+
+NewVirtualFunctions.push_back(MD);
+  }
+
+  if (ImplicitVirtualDtor)
+NewVirtualFunctions.push_back(ImplicitVirtualDtor);
 
   for (const CXXMethodDecl *MD : NewVirtualFunctions) {
 // Get the final overrider.

diff  --git a/clang/test/CodeGenCXX/virtual-compare.cpp 
b/clang/test/CodeGenCXX/virtual-compare.cpp
deleted file mode 100644
index 6ffbe8eb86ae..
--- a/clang/test/CodeGenCXX/virtual-compare.cpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// RUN: %clang_cc1 -std=c++2a -triple %itanium_abi_triple -emit-llvm %s -o - | 
FileCheck %s
-
-#include "Inputs/std-compare.h"
-
-// CHECK: @_ZTV1A =
-struct A;
-struct X {
-  // CHECK-SAME: @_ZN1X1xEv
-  virtual void x();
-  friend auto operator<=>(X, X) = default;
-};
-struct Y {
-  virtual ~Y();
-  virtual A =(const A &);
-  friend auto operator<=>(Y, Y) = default;
-};
-struct A : X, Y {
-  // CHECK-SAME: @_ZN1A1fEv
-  virtual void f();
-  // CHECK-SAME: @_ZNKR1AssERKS_
-  virtual std::strong_ordering operator<=>(const A &) const & = default;
-  // CHECK-SAME: @_ZN1A1gEv
-  virtual void g();
-  // CHECK-SAME: @_ZNKO1AssERKS_
-  virtual std::strong_ordering operator<=>(const A &) const && = default;
-  // CHECK-SAME: @_ZN1A1hEv
-  virtual void h();
-
-  // CHECK-SAME: @_ZN1AaSERKS_
-  // implicit virtual A =(const A&) = default;
-
-  // CHECK-SAME: @_ZN1AD1Ev
-  // CHECK-SAME: @_ZN1AD0Ev
-  // implicit virtual ~A();
-
-  // CHECK-SAME: @_ZNKR1AeqERKS_
-  // implicit virtual A ==(const A&) const & = default;
-
-  // CHECK-SAME: @_ZNKO1AeqERKS_
-  // implicit virtual A ==(const A&) const && = default;
-};
-
-// For Y:
-// CHECK-SAME: @_ZTI1A
-
-// CHECK-SAME: @_ZThn8_N1AD1Ev
-// CHECK-SAME: @_ZThn8_N1AD0Ev
-// virtual ~Y();
-
-// CHECK-SAME: @_ZThn8_N1AaSERKS_
-// virtual A =(const A &);
-
-void A::f() {}



___
cfe-commits mailing list

[clang] eadc97b - [CMake] Added remote test execution support into CrossWinToARMLinux CMake cache file.

2019-12-29 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2019-12-29T20:36:19-08:00
New Revision: eadc97b0ec87801ddcf35f03d1d005f9929a5254

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

LOG: [CMake] Added remote test execution support into CrossWinToARMLinux CMake 
cache file.

Added two confguration argument to provide a host name and SSH user name
to run the tests on the remote target host.

* REMOTE_TEST_HOST  - remote host name or address.
* REMOTE_TEST_USER  - passwordless SSH account name.

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

Added: 


Modified: 
clang/cmake/caches/CrossWinToARMLinux.cmake

Removed: 




diff  --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index 944465411363..9fbf090767e9 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -14,6 +14,8 @@
 #   -DDEFAULT_SYSROOT= ^
 #   -DLLVM_AR=/bin/llvm-ar[.exe] ^
 #   -DCMAKE_CXX_FLAGS="-D__OPTIMIZE__" ^
+#   -DREMOTE_TEST_HOST="" ^
+#   -DREMOTE_TEST_USER="" ^
 #   
-C/llvm-project/clang/cmake/caches/CrossWinToARMLinux.cmake ^
 #   /llvm-project/llvm
 # Build:
@@ -82,7 +84,33 @@ set(LIBCXX_SYSROOT  
"${DEFAULT_SYSROOT}" CACHE STRING ""
 set(BUILTINS_CMAKE_ARGS 
"-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR}" CACHE STRING "")
 set(RUNTIMES_CMAKE_ARGS 
"-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR}" CACHE STRING "")
 
-set(LLVM_INSTALL_TOOLCHAIN_ONLYON CACHE BOOL "")
+# Remote test configuration.
+if(DEFINED REMOTE_TEST_HOST)
+  set(DEFAULT_TEST_EXECUTOR 
"SSHExecutor('${REMOTE_TEST_HOST}', '${REMOTE_TEST_USER}')")
+  set(DEFAULT_TEST_TARGET_INFO  
"libcxx.test.target_info.LinuxLocalTI")
+
+  # Allow override with the custom values.
+  if(NOT DEFINED LIBUNWIND_TARGET_INFO)
+set(LIBUNWIND_TARGET_INFO   "${DEFAULT_TEST_TARGET_INFO}" 
CACHE STRING "")
+  endif()
+  if(NOT DEFINED LIBUNWIND_EXECUTOR)
+set(LIBUNWIND_EXECUTOR  "${DEFAULT_TEST_EXECUTOR}" CACHE 
STRING "")
+  endif()
+  if(NOT DEFINED LIBCXXABI_TARGET_INFO)
+set(LIBCXXABI_TARGET_INFO   "${DEFAULT_TEST_TARGET_INFO}" 
CACHE STRING "")
+  endif()
+  if(NOT DEFINED LIBCXXABI_EXECUTOR)
+set(LIBCXXABI_EXECUTOR  "${DEFAULT_TEST_EXECUTOR}" CACHE 
STRING "")
+  endif()
+  if(NOT DEFINED LIBCXX_TARGET_INFO)
+set(LIBCXX_TARGET_INFO  "${DEFAULT_TEST_TARGET_INFO}" 
CACHE STRING "")
+  endif()
+  if(NOT DEFINED LIBCXX_EXECUTOR)
+set(LIBCXX_EXECUTOR "${DEFAULT_TEST_EXECUTOR}" CACHE 
STRING "")
+  endif()
+endif()
+
+set(LLVM_INSTALL_TOOLCHAIN_ONLY ON CACHE BOOL "")
 set(LLVM_TOOLCHAIN_TOOLS
   llvm-ar
   llvm-cov



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


[clang] 0f5aabb - [CMake] Fix the path to CrossWinToARMLinux.cmake CMake cache.

2019-11-20 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2019-11-20T12:51:52-08:00
New Revision: 0f5aabb91a03b40635819f71187333dd9535b9de

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

LOG: [CMake] Fix the path to CrossWinToARMLinux.cmake CMake cache.

The comment was slightly misleading.

Behalf: broadwaylamb (Sergej Jaskiewicz)

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

Added: 


Modified: 
clang/cmake/caches/CrossWinToARMLinux.cmake

Removed: 




diff  --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
index 246f6241f0e2..944465411363 100644
--- a/clang/cmake/caches/CrossWinToARMLinux.cmake
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -14,7 +14,7 @@
 #   -DDEFAULT_SYSROOT= ^
 #   -DLLVM_AR=/bin/llvm-ar[.exe] ^
 #   -DCMAKE_CXX_FLAGS="-D__OPTIMIZE__" ^
-#   -C/llvm-project/clang/caches/CrossWinToARMLinux.cmake ^
+#   
-C/llvm-project/clang/cmake/caches/CrossWinToARMLinux.cmake ^
 #   /llvm-project/llvm
 # Build:
 #  cmake --build . --target install



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


[clang] a264e85 - [CMake] Add cross Windows to ARM Linux toolchain CMake cache file.

2019-11-01 Thread Vladimir Vereschaka via cfe-commits

Author: Vladimir Vereschaka
Date: 2019-11-01T12:40:25-07:00
New Revision: a264e85dd9f99391bedc7f069926bdd8d2f44388

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

LOG: [CMake] Add cross Windows to ARM Linux toolchain CMake cache file.

This cache file can be used to build a cross Windows to ARM Linux
toolchain.

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

Added: 
clang/cmake/caches/CrossWinToARMLinux.cmake

Modified: 


Removed: 




diff  --git a/clang/cmake/caches/CrossWinToARMLinux.cmake 
b/clang/cmake/caches/CrossWinToARMLinux.cmake
new file mode 100644
index ..246f6241f0e2
--- /dev/null
+++ b/clang/cmake/caches/CrossWinToARMLinux.cmake
@@ -0,0 +1,109 @@
+# CrossWinToARMLinux.cmake
+#
+# Set up a CMakeCache for a cross Windows to ARM Linux toolchain build.
+#
+# This cache file can be used to build a cross toolchain to ARM Linux
+# on Windows platform.
+#
+# NOTE: the build requires a development ARM Linux root filesystem to use
+# proper target platform depended library and header files.
+#
+# Configure:
+#  cmake -G Ninja ^
+#   -DCMAKE_INSTALL_PREFIX=../install ^
+#   -DDEFAULT_SYSROOT= ^
+#   -DLLVM_AR=/bin/llvm-ar[.exe] ^
+#   -DCMAKE_CXX_FLAGS="-D__OPTIMIZE__" ^
+#   -C/llvm-project/clang/caches/CrossWinToARMLinux.cmake ^
+#   /llvm-project/llvm
+# Build:
+#  cmake --build . --target install
+# Test:
+#  cmake --build . --target check-llvm
+#  cmake --build . --target check-clang
+#  cmake --build . --target check-lld
+
+if (NOT DEFINED DEFAULT_SYSROOT)
+  message(WARNING "DEFAULT_SYSROOT must be specified for the cross toolchain 
build.")
+endif()
+
+if (DEFINED LLVM_AR)
+  set(CMAKE_AR "${LLVM_AR}" CACHE STRING "")
+endif()
+
+if (NOT DEFINED LLVM_TARGETS_TO_BUILD)
+  set(LLVM_TARGETS_TO_BUILD "ARM" CACHE STRING "")
+endif()
+
+if (NOT DEFINED CMAKE_C_COMPILER_TARGET)
+  # Required if COMPILER_RT_DEFAULT_TARGET_ONLY is ON
+  set(CMAKE_C_COMPILER_TARGET "armv7-linux-gnueabihf" CACHE STRING "")
+endif()
+
+if (NOT DEFINED CMAKE_BUILD_TYPE)
+  set(CMAKE_BUILD_TYPE "Release" CACHE STRING "")
+endif()
+
+set(CMAKE_CROSSCOMPILINGON CACHE BOOL "")
+set(CMAKE_CL_SHOWINCLUDES_PREFIX"Note: including file: " CACHE 
STRING "")
+
+set(LLVM_ENABLE_ASSERTIONS  ON CACHE BOOL "")
+set(LLVM_ENABLE_PROJECTS"clang;clang-tools-extra;lld" 
CACHE STRING "")
+set(LLVM_ENABLE_RUNTIMES
"compiler-rt;libunwind;libcxxabi;libcxx" CACHE STRING "")
+set(LLVM_DEFAULT_TARGET_TRIPLE  "${CMAKE_C_COMPILER_TARGET}" CACHE 
STRING "")
+set(LLVM_TARGET_ARCH"${CMAKE_C_COMPILER_TARGET}" CACHE 
STRING "")
+set(LLVM_LIT_ARGS   "-vv ${LLVM_LIT_ARGS}" CACHE 
STRING "" FORCE)
+
+set(CLANG_DEFAULT_LINKER"lld" CACHE STRING "")
+
+set(COMPILER_RT_BUILD_BUILTINS  ON CACHE BOOL "")
+set(COMPILER_RT_BUILD_SANITIZERSOFF CACHE BOOL "")
+set(COMPILER_RT_BUILD_XRAY  OFF CACHE BOOL "")
+set(COMPILER_RT_BUILD_LIBFUZZER OFF CACHE BOOL "")
+set(COMPILER_RT_BUILD_PROFILE   OFF CACHE BOOL "")
+set(COMPILER_RT_DEFAULT_TARGET_ONLY ON CACHE BOOL "")
+
+set(LIBUNWIND_USE_COMPILER_RT   ON CACHE BOOL "")
+set(LIBUNWIND_TARGET_TRIPLE "${CMAKE_C_COMPILER_TARGET}" CACHE 
STRING "")
+set(LIBUNWIND_SYSROOT   "${DEFAULT_SYSROOT}" CACHE STRING 
"")
+set(LIBUNWIND_ENABLE_SHARED OFF CACHE BOOL "")
+
+set(LIBCXXABI_USE_LLVM_UNWINDER ON CACHE BOOL "")
+set(LIBCXXABI_ENABLE_STATIC_UNWINDERON CACHE BOOL "")
+set(LIBCXXABI_USE_COMPILER_RT   ON CACHE BOOL "")
+set(LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS OFF CACHE BOOL "")
+set(LIBCXXABI_TARGET_TRIPLE "${CMAKE_C_COMPILER_TARGET}" CACHE 
STRING "")
+set(LIBCXXABI_SYSROOT   "${DEFAULT_SYSROOT}" CACHE STRING 
"")
+
+set(LIBCXX_USE_COMPILER_RT  ON CACHE BOOL "")
+set(LIBCXX_TARGET_TRIPLE"${CMAKE_C_COMPILER_TARGET}" CACHE 
STRING "")
+set(LIBCXX_SYSROOT  "${DEFAULT_SYSROOT}" CACHE STRING 
"")
+
+set(BUILTINS_CMAKE_ARGS 
"-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR}" CACHE STRING "")
+set(RUNTIMES_CMAKE_ARGS 
"-DCMAKE_SYSTEM_NAME=Linux;-DCMAKE_AR=${CMAKE_AR}" CACHE STRING "")
+
+set(LLVM_INSTALL_TOOLCHAIN_ONLYON CACHE BOOL "")
+set(LLVM_TOOLCHAIN_TOOLS
+  llvm-ar
+  llvm-cov
+  llvm-cxxfilt
+  llvm-dwarfdump
+  llvm-lib
+  llvm-nm
+  llvm-objdump
+  llvm-profdata
+  llvm-ranlib
+  llvm-readobj
+  llvm-size
+  llvm-symbolizer
+  CACHE STRING "")
+