Skip to content

[libc] support out of tree build with dynlibs #97959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion libc/utils/HdrGen/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
include(TableGen)

set(LLVM_LINK_COMPONENTS Support)
if (NOT LLVM_LINK_LLVM_DYLIB)
set(LLVM_LINK_COMPONENTS Support)
endif()

add_tablegen(libc-hdrgen LIBC
Command.h
Expand Down
8 changes: 6 additions & 2 deletions libc/utils/LibcTableGenUtil/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
if (NOT LLVM_LINK_LLVM_DYLIB)
set(flags "DISABLE_LLVM_LINK_LLVM_DYLIB;LINK_COMPONENTS;Support;TableGen")
else()
set(flags "LINK_COMPONENTS;TableGen")
endif()
add_llvm_library(
LibcTableGenUtil
APIIndexer.cpp
APIIndexer.h
DISABLE_LLVM_LINK_LLVM_DYLIB
LINK_COMPONENTS Support TableGen
${flags}
)
target_include_directories(LibcTableGenUtil PUBLIC ${LIBC_SOURCE_DIR})
target_include_directories(LibcTableGenUtil PRIVATE ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR})
Loading