[clang] [CMake] respect LLVMConfig.cmake's LLVM_DEFINITIONS (PR #138587)

2025-05-07 Thread via cfe-commits
jeremyd2019 wrote: I rebased this on top of #138783 and adjusted the title and description. Now it should be in a good state to push cmake changes for other projects. https://github.com/llvm/llvm-project/pull/138587 ___ cfe-commits mailing list cfe-c

[clang] [CMake] respect LLVMConfig.cmake's LLVM_DEFINITIONS (PR #138587)

2025-05-07 Thread via cfe-commits
https://github.com/jeremyd2019 edited https://github.com/llvm/llvm-project/pull/138587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CMake] respect LLVMConfig.cmake's LLVM_DEFINITIONS (PR #138587)

2025-05-07 Thread via cfe-commits
https://github.com/jeremyd2019 edited https://github.com/llvm/llvm-project/pull/138587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CMake] respect LLVMConfig.cmake's LLVM_DEFINITIONS (PR #138587)

2025-05-07 Thread via cfe-commits
https://github.com/jeremyd2019 updated https://github.com/llvm/llvm-project/pull/138587 >From 0c380bb4f2f41679ef32db2b9358cf127257d1fb Mon Sep 17 00:00:00 2001 From: Jeremy Drake Date: Tue, 6 May 2025 16:54:24 -0700 Subject: [PATCH 1/2] [Clang][CMake] use CMakePushCheckState The previous appro

[clang] [Clang][CMake] respect LLVMConfig.cmake's LLVM_DEFINITIONS (PR #138587)

2025-05-07 Thread Michał Górny via cfe-commits
mgorny wrote: Yeah, I think it's a good idea. Thanks for doing that! https://github.com/llvm/llvm-project/pull/138587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CMake] respect LLVMConfig.cmake's LLVM_DEFINITIONS (PR #138587)

2025-05-06 Thread via cfe-commits
jeremyd2019 wrote: Also, should all of those projects be updated in one pull request, or do I need to open a half-dozen more? https://github.com/llvm/llvm-project/pull/138587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.o

[clang] [Clang][CMake] respect LLVMConfig.cmake's LLVM_DEFINITIONS (PR #138587)

2025-05-06 Thread via cfe-commits
jeremyd2019 wrote: > I agree that the second change, that is using `LLVMConfig.cmake`'s > `LLVM_DEFINITIONS`, should be applied to other projects that support > standalone builds like LLD. Is there a list somewhere or do I just rely on my grep-foo? * bolt * clang * flang * lld * lldb * mlir g

[clang] [Clang][CMake] respect LLVMConfig.cmake's LLVM_DEFINITIONS (PR #138587)

2025-05-06 Thread Martin Storsjö via cfe-commits
mstorsjo wrote: > If this is right, it should probably be done to other standalone-capable > projects' CMakeLists.txt also (LLD in particular, for my interests). > Actually, it seems there's nothing in LLD that requires _GNU_SOURCE on > Cygwin... Yep, indeed. I guess the main question is who

[clang] [Clang][CMake] respect LLVMConfig.cmake's LLVM_DEFINITIONS (PR #138587)

2025-05-05 Thread via cfe-commits
jeremyd2019 wrote: If this is right, it should probably be done to other standalone-capable projects' CMakeLists.txt also (LLD in particular, for my interests) https://github.com/llvm/llvm-project/pull/138587 ___ cfe-commits mailing list cfe-commits@l

[clang] [Clang][CMake] respect LLVMConfig.cmake's LLVM_DEFINITIONS (PR #138587)

2025-05-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (jeremyd2019) Changes In #138329, _GNU_SOURCE was added for Cygwin, but when building Clang standalone against an installed LLVM this definition was not picked up, resulting in undefined strnlen. Follow the documentation in https:/

[clang] [Clang][CMake] respect LLVMConfig.cmake's LLVM_DEFINITIONS (PR #138587)

2025-05-05 Thread via cfe-commits
https://github.com/jeremyd2019 created https://github.com/llvm/llvm-project/pull/138587 In #138329, _GNU_SOURCE was added for Cygwin, but when building Clang standalone against an installed LLVM this definition was not picked up, resulting in undefined strnlen. Follow the documentation in ht