[Lldb-commits] [clang] [clang-tools-extra] [lldb] [llvm] [NFC] Prefer subprocess.DEVNULL over os.devnull (PR #106500)

2024-08-30 Thread Alexander Richardson via lldb-commits

https://github.com/arichardson closed 
https://github.com/llvm/llvm-project/pull/106500
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang-tools-extra] [llvm] [libcxxabi] [libclc] [libcxx] [flang] [clang] [libunwind] [compiler-rt] [libc] [lld] [lldb] [builtins] Generate __multc3 for z/OS (PR #77554)

2024-01-11 Thread Alexander Richardson via lldb-commits


@@ -374,10 +376,10 @@ static __inline fp_t __compiler_rt_fmax(fp_t x, fp_t y) {
 #endif
 }
 
-#elif defined(QUAD_PRECISION) && defined(CRT_HAS_TF_MODE)
+#elif defined(QUAD_PRECISION)
 // The generic implementation only works for ieee754 floating point. For other
 // floating point types, continue to rely on the libm implementation for now.
-#if defined(CRT_HAS_IEEE_TF)
+#if defined(CRT_HAS_TF_MODE) && defined(CRT_HAS_IEEE_TF)

arichardson wrote:

```suggestion
#if defined(CRT_HAS_IEEE_TF) && defined(CRT_HAS_128BIT)
```

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


[Lldb-commits] [libc] [lldb] [clang-tools-extra] [libclc] [llvm] [libunwind] [clang] [lld] [compiler-rt] [libcxx] [libcxxabi] [flang] [builtins] Generate __multc3 for z/OS (PR #77554)

2024-01-11 Thread Alexander Richardson via lldb-commits


@@ -189,11 +189,15 @@ typedef long double tf_float;
 #define CRT_LDBL_IEEE_F128
 #endif
 #define TF_C(x) x##L
-#elif __LDBL_MANT_DIG__ == 113
-// Use long double instead of __float128 if it matches the IEEE 128-bit format.
+#elif __LDBL_MANT_DIG__ == 113 ||  
\
+(__FLT_RADIX__ == 16 && __LDBL_MANT_DIG__ == 28)
+// Use long double instead of __float128 if it matches the IEEE 128-bit format
+// or the IBM hexadecimal format.
 #define CRT_LDBL_128BIT
+#if __LDBL_MANT_DIG__ == 113
 #define CRT_HAS_F128
 #define CRT_HAS_IEEE_TF
+#endif
 #define CRT_LDBL_IEEE_F128

arichardson wrote:

```suggestion
#define CRT_LDBL_128BIT
#define CRT_HAS_F128
#if __LDBL_MANT_DIG__ == 113
#define CRT_HAS_IEEE_TF
#define CRT_LDBL_IEEE_F128
#endif
```

I was suggesting to not define the tf_float is IEEE macros, CRT_HAS_F128 should 
still be set since we do have a 128-bit floating point type.

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


[Lldb-commits] [llvm] [libunwind] [compiler-rt] [lld] [clang-tools-extra] [libc] [flang] [libcxx] [clang] [lldb] [libclc] [libcxxabi] [builtins] Generate __multc3 for z/OS (PR #77554)

2024-01-11 Thread Alexander Richardson via lldb-commits


@@ -15,8 +15,6 @@
 #include "int_lib.h"
 #include "int_math.h"
 
-#if defined(CRT_HAS_TF_MODE)

arichardson wrote:

I'm not sure if we support architectures without a "tf" floating point type. To 
be safe I believe we still need a guard here since this file is compiled 
unconditionally. We just have to replace it with "CRT_HAS_F128".

A nice future cleanup would be to change CRT_HAS_TF_MODE to actually mean 
tf_float exists and explicitly guard for INT128 where needed. But that is a 
larger cleanup that probably shouldn't be part of this PR.

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


[Lldb-commits] [flang] [clang-tools-extra] [lld] [llvm] [libcxx] [compiler-rt] [clang] [libcxxabi] [libc] [libunwind] [lldb] [libclc] [builtins] Generate __multc3 for z/OS (PR #77554)

2024-01-11 Thread Alexander Richardson via lldb-commits


@@ -13,8 +13,6 @@
 #define QUAD_PRECISION
 #include "fp_lib.h"
 
-#if defined(CRT_HAS_TF_MODE)

arichardson wrote:

I'd suggest replacing this with CRT_HAS_F128 as noted below (unless you're will 
to audit all current uses of CRT_HAS_TF_MODE since that currently is a proxy 
for TF_MODE&&INT128 rather than just TF_MODE).

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


[Lldb-commits] [compiler-rt] [libcxxabi] [lld] [lldb] [clang] [llvm] [libc] [libclc] [libunwind] [libcxx] [clang-tools-extra] [flang] [builtins] Generate __multc3 for z/OS (PR #77554)

2024-01-11 Thread Alexander Richardson via lldb-commits

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

Thanks this looks good to me now and should not change anything for other 
targets.

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


[Lldb-commits] [compiler-rt] [lld] [clang-tools-extra] [libclc] [llvm] [libcxx] [libcxxabi] [lldb] [flang] [libc] [libunwind] [clang] [builtins] Generate __multc3 for z/OS (PR #77554)

2024-01-11 Thread Alexander Richardson via lldb-commits

https://github.com/arichardson closed 
https://github.com/llvm/llvm-project/pull/77554
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [clang] [clang-tools-extra] [compiler-rt] [flang] [libclc] [libcxx] [lld] [lldb] [llvm] [NFC] Remove trailing whitespace across all non-test related files (PR #82838)

2024-02-23 Thread Alexander Richardson via lldb-commits

arichardson wrote:

This will cause huge merge conflicts for all downstreams. While they are easy 
to resolve it can be quite annoying. I think we should just do this as part of 
the global clang-format.

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


[Lldb-commits] [llvm] [clang-tools-extra] [libclc] [libc] [lld] [lldb] [clang] [libcxx] [libcxxabi] [flang] [libunwind] [compiler-rt] [builtins] Generate __multc3 for z/OS (PR #77554)

2024-01-12 Thread Alexander Richardson via lldb-commits


@@ -374,10 +376,10 @@ static __inline fp_t __compiler_rt_fmax(fp_t x, fp_t y) {
 #endif
 }
 
-#elif defined(QUAD_PRECISION) && defined(CRT_HAS_TF_MODE)
+#elif defined(QUAD_PRECISION)

arichardson wrote:

Looks like this was actually required. Probably needs to be changed to `#elif 
defined(QUAD_PRECISION) && defined(CRT_HAS_F128)`. @perry-ca Could you open a 
new PR with this change? See https://github.com/llvm/llvm-project/issues/77898 
and https://github.com/llvm/llvm-project/issues/77880

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


[Lldb-commits] [libcxx] [libcxxabi] [lldb] [libc++] Stop copying headers to the build directory (PR #115380)

2025-01-14 Thread Alexander Richardson via lldb-commits

arichardson wrote:

I realize there are some issues with this and while it's a nice cleanup, I 
don't have the time right now to deal with the potential fallout (build 
directory can't be used as a cross-compiler out of the box).

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


[Lldb-commits] [libcxx] [libcxxabi] [lldb] [libc++] Stop copying headers to the build directory (PR #115380)

2025-01-15 Thread Alexander Richardson via lldb-commits

arichardson wrote:

Sanitizer build has been fixed but I know this will also break the Fuchsia 
build bots if we reland it (see 
https://github.com/llvm/llvm-project/pull/115379#issuecomment-2469268557) - not 
sure if there is any plan to update those builders to use installed toolchains 
for the multi-stage build.

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


[Lldb-commits] [libcxx] [libcxxabi] [lldb] [libc++] Stop copying headers to the build directory (PR #115380)

2025-01-15 Thread Alexander Richardson via lldb-commits

arichardson wrote:

> IIUC, the build that encountered issues in this patch ([in the comment 
> above](https://github.com/llvm/llvm-project/pull/115380#issuecomment-2590801533))
>  is a flavour of (2), right? That seems surprising to me though since we also 
> use the same flags when configuring libc++: 
> https://github.com/llvm/llvm-project/blob/main/libcxx/CMakeLists.txt#L596
> 
> So the difference would be that you folks are building libc++ instrumented 
> via the bootstrapping build instead of the "runtimes" build that we use for 
> the rest of libc++ CI. I also fail to understand why our own bootstrapping 
> build pre-commit CI didn't trip this wire.

I think the problem is that some of the buildbots use the compiler from the 
stage1 build directory as the compiler for the stage2 build. This happens to 
pick up the correct libc++ if the headers are in the build directory, but 
without the symlinks it would need to be installed first to another directory 
and then use the stage1 install as the compiler for stage 2.

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


[Lldb-commits] [libcxx] [libcxxabi] [lldb] [libc++] Stop copying headers to the build directory (PR #115380)

2025-01-15 Thread Alexander Richardson via lldb-commits

arichardson wrote:

> https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh

It looks like 
https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
 tries to run `ninja cxx cxxabi` and then use the build dir of that build for 
the build of LLVM. I think runnning `ninja install-cxx install-cxxabi` and 
using the install dir as the destination might fix it?

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


[Lldb-commits] [libcxx] [libcxxabi] [lldb] [libc++] Stop copying headers to the build directory (PR #115380)

2025-01-15 Thread Alexander Richardson via lldb-commits

arichardson wrote:

> > > https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
> > 
> > 
> > It looks like 
> > https://github.com/llvm/llvm-project/blob/main/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
> >  tries to run `ninja cxx cxxabi` and then use the build dir of that build 
> > for the build of LLVM. I think runnning `ninja install-cxx install-cxxabi` 
> > and using the install dir as the destination might fix it?
> 
> Very likely. I can take a look, unless you are already there.

https://github.com/llvm/llvm-project/pull/123104 should hopefully fix it.

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


[Lldb-commits] [compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-23 Thread Alexander Richardson via lldb-commits


@@ -223,6 +223,13 @@ endif()
 # This can be used to detect whether we're in the runtimes build.
 set(LLVM_RUNTIMES_BUILD ON)
 
+if (LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND UNIX AND ${CMAKE_SYSTEM_NAME} 
MATCHES "AIX")
+  # Set LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF as AIX doesn't support it
+  message(WARNING
+  "LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON is not supported on AIX. 
LLVM_ENABLE_PER_TARGET_RUNTIME_DIR is set to OFF.")
+  set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF CACHE BOOL "" FORCE)
+endif()

arichardson wrote:

I agree that if there is no way to make it work, a FATAL_ERROR would be better. 
I also think it would be nice to remove the `if (APPLE)` special cases but that 
sounds like a much larger change.

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


[Lldb-commits] [compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-14 Thread Alexander Richardson via lldb-commits

arichardson wrote:

> > Wouldn't it be more maintainable to just force the value to OFF for AIX 
> > where the `option()` is defined?
> 
> Unfortunately, the cmake command line option `-D 
> LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON` overrides the `option()` in the cmake 
> file.

Sorry if this was not clear, I didn't mean changing the default value of the 
option, but instead forcing it explicitly in the one central place where the 
option is defined.

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


[Lldb-commits] [compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-17 Thread Alexander Richardson via lldb-commits

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


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


[Lldb-commits] [compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-17 Thread Alexander Richardson via lldb-commits

arichardson wrote:

> @arichardson I found the way to override the cache file. Thanks for the 
> suggestion!

Thanks this looks good to me.

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


[Lldb-commits] [compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-17 Thread Alexander Richardson via lldb-commits


@@ -1187,16 +1187,19 @@ endif()
 # Build with _XOPEN_SOURCE on AIX, as stray macros in _ALL_SOURCE mode tend to
 # break things. In this case we need to enable the large-file API as well.
 if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX")
-  add_compile_definitions(_XOPEN_SOURCE=700)
-  add_compile_definitions(_LARGE_FILE_API)
-  add_compile_options(-pthread)
+  add_compile_definitions(_XOPEN_SOURCE=700)
+  add_compile_definitions(_LARGE_FILE_API)
+  add_compile_options(-pthread)
 
   # Modules should be built with -shared -Wl,-G, so we can use runtime linking
   # with plugins.
   string(APPEND CMAKE_MODULE_LINKER_FLAGS " -shared -Wl,-G")
 
   # Also set the correct flags for building shared libraries.
   string(APPEND CMAKE_SHARED_LINKER_FLAGS " -shared")
+
+  # Set LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF as AIX doesn't support it
+  set(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR OFF CACHE BOOL "" FORCE)

arichardson wrote:

Do we also need to set this in runtimes/CMakeLists.txt for standalone runtimes 
builds without bootstrapping LLVM?

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


[Lldb-commits] [compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-13 Thread Alexander Richardson via lldb-commits

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

Wouldn't it be more maintainable to just set the value to off for AIX where the 
`option()` is defined?

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


[Lldb-commits] [compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-13 Thread Alexander Richardson via lldb-commits

https://github.com/arichardson edited 
https://github.com/llvm/llvm-project/pull/131200
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits