[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Tristan Ross via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen llvm/lib/CodeGen) +endif() RossComputerGuy wrote: Looks like CMake accepted that change, let's see if it

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd edited https://github.com/llvm/llvm-project/pull/109601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd edited https://github.com/llvm/llvm-project/pull/109601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Saleem Abdulrasool via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen llvm/lib/CodeGen) +endif() compnerd wrote: https://github.com/llvm/llvm-project/blob/main/llvm/cmake/mod

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Tristan Ross via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen llvm/lib/CodeGen) +endif() RossComputerGuy wrote: Ok, so the solution is to set `-DLLVM_DIR` which is do

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Saleem Abdulrasool via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen llvm/lib/CodeGen) +endif() compnerd wrote: The issue is that the `vt_gen` target is undefined. This is _

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Tristan Ross via cfe-commits
RossComputerGuy wrote: > The `add_subdirectory` is definitely odd and I'm not sure if that is a proper > solution. I'm not familiar with how LLVM CodeGen works and I am a bit new to LLVM but I looked at [`clang/CMakeLists.txt`](https://github.com/llvm/llvm-project/blob/d61b2590f8e360695a52983

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Saleem Abdulrasool via cfe-commits
compnerd wrote: > @compnerd @etcwilde WDYT about conditionalizing the new dependency with an > `if (TARGET vt_gen)` instead of doing the `add_subdirectory()` dance? Ugh, I misread the change as `include_directories`. The `add_subdirectory` is definitely odd and I'm not sure if that is a proper

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Tristan Ross via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen llvm/lib/CodeGen) +endif() RossComputerGuy wrote: I'm not exactly sure what you're meaning. https://git

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Saleem Abdulrasool via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen llvm/lib/CodeGen) +endif() compnerd wrote: No, `LLVM_DIR` is passed to the CMake configure step to locat

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Jon Roelofs via cfe-commits
jroelofs wrote: @compnerd @etcwilde WDYT about conditionalizing the new dependency with an `if (TARGET vt_gen)` instead of doing the `add_subdirectory()` dance? https://github.com/llvm/llvm-project/pull/109601 ___ cfe-commits mailing list cfe-commits@

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Tristan Ross via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) RossComputerGuy wrote: Ok, will do. https://github.com/llvm/llvm-project/pull/109601 ___ cfe-commits mailing list cfe-com

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Tristan Ross via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen llvm/lib/CodeGen) +endif() RossComputerGuy wrote: I'm not sure, are you meaning to use `LLVM_DIR` instea

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Saleem Abdulrasool via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) compnerd wrote: I think that I would rather have the cases mirrored here - the path should always exist in general, it is only the standalone case that is special.

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-23 Thread Saleem Abdulrasool via cfe-commits
@@ -1,3 +1,7 @@ +if(EXISTS ${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen AND CLANG_BUILT_STANDALONE) + add_subdirectory(${LLVM_MAIN_SRC_DIR}/include/llvm/CodeGen llvm/lib/CodeGen) +endif() compnerd wrote: IIRC, even in the standalone case, you need to identify the L

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-22 Thread Tristan Ross via cfe-commits
https://github.com/RossComputerGuy updated https://github.com/llvm/llvm-project/pull/109601 >From cab2a5cebdc63425ed03a31028e6eb2aee00e5d9 Mon Sep 17 00:00:00 2001 From: Tristan Ross Date: Sun, 22 Sep 2024 21:02:12 -0700 Subject: [PATCH] [Clang] Include LLVM CodeGen CMake file --- clang/lib/C

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tristan Ross (RossComputerGuy) Changes Fixes a build failure with Clang being built from standalone sources (environments like Nix). Exact error: ``` CMake Error at /nix/store/h9yw8mg03z3dz6rgcjr7gbzkjysqc2sj-llvm-20.0.0-unstable-2024-09

[clang] [Clang] Include LLVM CodeGen CMake file (PR #109601)

2024-09-22 Thread Tristan Ross via cfe-commits
https://github.com/RossComputerGuy created https://github.com/llvm/llvm-project/pull/109601 Fixes a build failure with Clang being built from standalone sources (environments like Nix). Exact error: ``` CMake Error at /nix/store/h9yw8mg03z3dz6rgcjr7gbzkjysqc2sj-llvm-20.0.0-unstable-2024-09-22