[clang] [compiler-rt] [flang] [libc] [libclc] [libcxx] [lldb] [llvm] [mlir] [polly] Make AMDGPUCombinerHelper methods const (PR #121740)
Alejandro =?utf-8?q?Álvarez_Ayllón?=,Matthias Springer =?utf-8?q?,?=Mats Petersson ,Benjamin Maxwell ,Nikolas Klauser ,Luke Lau ,Dhruv Srivastava ,staz ,Arseniy Zaostrovnykh ,Kerry McLaughlin ,Maksim Levental ,Vikash Gupta ,Maksim Levental ,Simon Pilgrim ,Yihe Li ,Nico Weber ,David Sherwood ,JoelWee <32009741+joel...@users.noreply.github.com>,Phoebe Wang ,Simon Pilgrim ,Nikita Popov ,Yingwei Zheng ,cor3ntin ,Joseph Huber ,Vlad Serebrennikov ,Nikita Popov ,Vlad Serebrennikov ,arthurqiu ,Joseph Huber ,Paul Bowen-Huggett Message-ID: In-Reply-To: paulhuggett wrote: Sorry, I screwed up resolving conflicts. I'm going to abandon this PR and try again. https://github.com/llvm/llvm-project/pull/121740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [compiler-rt] [flang] [libc] [libclc] [libcxx] [lldb] [llvm] [mlir] [polly] Make AMDGPUCombinerHelper methods const (PR #121740)
Alejandro =?utf-8?q?Álvarez_Ayllón?=,Matthias Springer =?utf-8?q?,?=Mats Petersson ,Benjamin Maxwell ,Nikolas Klauser ,Luke Lau ,Dhruv Srivastava ,staz ,Arseniy Zaostrovnykh ,Kerry McLaughlin ,Maksim Levental ,Vikash Gupta ,Maksim Levental ,Simon Pilgrim ,Yihe Li ,Nico Weber ,David Sherwood ,JoelWee <32009741+joel...@users.noreply.github.com>,Phoebe Wang ,Simon Pilgrim ,Nikita Popov ,Yingwei Zheng ,cor3ntin ,Joseph Huber ,Vlad Serebrennikov ,Nikita Popov ,Vlad Serebrennikov ,arthurqiu ,Joseph Huber ,Paul Bowen-Huggett Message-ID: In-Reply-To: https://github.com/paulhuggett closed https://github.com/llvm/llvm-project/pull/121740 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Fix a cmake error when using the Xcode generator. (PR #119403)
paulhuggett wrote: > I guess I must of broke build for the MSVC MSBuild/vcxproj CMake generator (Thanks for the reply, and apologies for the slow response.) I've spent time trying to properly understand the flow through the add_clang_library and add_llvm_library. As far as I can tell, the implementation for the MSVC generator is just fine (at least when running cmake without any fancy options). The thing that is missing for Xcode is a test for the existence of the "${name}.obj" library that matches line #114 (as of commit 97ff961) in the MSVC branch of the if/elseif. https://github.com/llvm/llvm-project/pull/119403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Fix a cmake error when using the Xcode generator. (PR #119403)
https://github.com/paulhuggett edited https://github.com/llvm/llvm-project/pull/119403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Fix a cmake error when using the Xcode generator. (PR #119403)
https://github.com/paulhuggett edited https://github.com/llvm/llvm-project/pull/119403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Fix a cmake error when using the Xcode generator. (PR #119403)
https://github.com/paulhuggett created https://github.com/llvm/llvm-project/pull/119403 I’m seeing a series of errors when trying to run the cmake configure step on macOS when the cmake generator is set to Xcode. All is well if I use the Ninja or Unix Makefile generators. Messages are all of the form: ~~~ CMake Error at …llvm-project/clang/cmake/modules/AddClang.cmake:120 (target_compile_definitions): Cannot specify compile definitions for target "obj.clangBasic" which is not built by this project. Call Stack (most recent call first): …llvm-project/clang/lib/Basic/CMakeLists.txt:57 (add_clang_library) ~~~ The remaining errors mention targets obj.clangAPINotes, obj.clangLex, obj.clangParse, and so on. The regression appears to have been introduced by commit 09fa2f012fcc (Oct 14 2024) which added the code in this area. My proposed solution is simply to add a test to ensure that the obj.x target exists before setting its compile definitions. There is precedent doing just this in both clang/cmake/modules/AddClang.cmake and clang/lib/support/CMakeLists.txt as well as in the “MSVC AND NOT CLANG_LINK_CLANG_DYLIB” path immediately above the offending line. I’ve also made a couple of grammatical tweaks in the comments surrounding this code. >From 7a1283573d487a3a1b499c55408448c4f667f3d0 Mon Sep 17 00:00:00 2001 From: Paul Bowen-Huggett Date: Tue, 10 Dec 2024 16:48:34 +0100 Subject: [PATCH] Fix a cmake error when using the Xcode generator. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I’m seeing a series of errors when trying to run the cmake configure step when the cmake generator is set to Xcode. All is well if I use the Ninja or Unix Makefile generators. Messages are all of the form: CMake Error at …llvm-project/clang/cmake/modules/AddClang.cmake:120 (target_compile_definitions): Cannot specify compile definitions for target "obj.clangBasic" which is not built by this project. Call Stack (most recent call first): …llvm-project/clang/lib/Basic/CMakeLists.txt:57 (add_clang_library) The remaining errors mention targets obj.clangAPINotes, obj.clangLex, obj.clangParse, and so on. The regression appears to have been introduced by commit 09fa2f012fcc (Oct 14 2024) which added the code in this area. My proposed solution is simply to add a test to ensure that the obj.x target exists before setting its compile definitions. There is precedent doing just this in both clang/cmake/modules/AddClang.cmake and clang/lib/support/CMakeLists.txt as well as in the “MSVC AND NOT CLANG_LINK_CLANG_DYLIB” path immediately above the offending line. I’ve also made a couple of grammatical tweaks in the comments surrounding this code. --- clang/cmake/modules/AddClang.cmake | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake index 091aec98e93ca3..cdc8bd5cd503b4 100644 --- a/clang/cmake/modules/AddClang.cmake +++ b/clang/cmake/modules/AddClang.cmake @@ -109,13 +109,14 @@ macro(add_clang_library name) llvm_add_library(${name} ${LIBTYPE} ${ARG_UNPARSED_ARGUMENTS} ${srcs}) if(MSVC AND NOT CLANG_LINK_CLANG_DYLIB) -# Make sure all consumers also turn off visibility macros so there not trying to dllimport symbols. +# Make sure all consumers also turn off visibility macros so they're not +# trying to dllimport symbols. target_compile_definitions(${name} PUBLIC CLANG_BUILD_STATIC) if(TARGET "obj.${name}") target_compile_definitions("obj.${name}" PUBLIC CLANG_BUILD_STATIC) endif() - elseif(NOT ARG_SHARED AND NOT ARG_STATIC) -# Clang component libraries linked in to clang-cpp are declared without SHARED or STATIC + elseif(TARGET "obj.${name}" AND NOT ARG_SHARED AND NOT ARG_STATIC) +# Clang component libraries linked to clang-cpp are declared without SHARED or STATIC target_compile_definitions("obj.${name}" PUBLIC CLANG_EXPORTS) endif() ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] Fix a cmake error when using the Xcode generator. (PR #119403)
paulhuggett wrote: Sorry, I should have mentioned the authors of commit 09fa2f012fcc: @fsfod and @AaronBallman. https://github.com/llvm/llvm-project/pull/119403 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits