Skip to content
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

[lldb] Revise IDE folder structure #89748

Merged
merged 11 commits into from
May 25, 2024
1 change: 1 addition & 0 deletions lldb/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cmake_minimum_required(VERSION 3.20.0)
set(LLVM_SUBPROJECT_TITLE "LLDB")

if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
Expand Down
6 changes: 2 additions & 4 deletions lldb/cmake/modules/AddLLDB.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ function(lldb_tablegen)

if(LTG_TARGET)
add_public_tablegen_target(${LTG_TARGET})
set_target_properties( ${LTG_TARGET} PROPERTIES FOLDER "LLDB tablegenning")
set_property(GLOBAL APPEND PROPERTY LLDB_TABLEGEN_TARGETS ${LTG_TARGET})
endif()
endfunction(lldb_tablegen)
Expand Down Expand Up @@ -165,10 +164,10 @@ function(add_lldb_library name)
get_property(parent_dir DIRECTORY PROPERTY PARENT_DIRECTORY)
if(EXISTS ${parent_dir})
get_filename_component(category ${parent_dir} NAME)
set_target_properties(${name} PROPERTIES FOLDER "lldb plugins/${category}")
set_target_properties(${name} PROPERTIES FOLDER "LLDB/Plugins/${category}")
endif()
else()
set_target_properties(${name} PROPERTIES FOLDER "lldb libraries")
set_target_properties(${name} PROPERTIES FOLDER "LLDB/Libraries")
endif()

# If we want to export all lldb symbols (i.e LLDB_EXPORT_ALL_SYMBOLS=ON), we
Expand Down Expand Up @@ -208,7 +207,6 @@ function(add_lldb_executable name)
else()
target_link_libraries(${name} PRIVATE ${ARG_CLANG_LIBS})
endif()
set_target_properties(${name} PROPERTIES FOLDER "lldb executables")

if (ARG_BUILD_RPATH)
set_target_properties(${name} PROPERTIES BUILD_RPATH "${ARG_BUILD_RPATH}")
Expand Down
2 changes: 1 addition & 1 deletion lldb/cmake/modules/LLDBConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
)

add_custom_target(lldb-headers)
set_target_properties(lldb-headers PROPERTIES FOLDER "lldb misc")
set_target_properties(lldb-headers PROPERTIES FOLDER "LLDB/Resources")

if (NOT CMAKE_CONFIGURATION_TYPES)
add_llvm_install_targets(install-lldb-headers
Expand Down
2 changes: 1 addition & 1 deletion lldb/cmake/modules/LLDBFramework.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ endforeach()

# Wrap output in a target, so lldb-framework can depend on it.
add_custom_target(liblldb-resource-headers DEPENDS ${lldb_staged_headers})
set_target_properties(liblldb-resource-headers PROPERTIES FOLDER "lldb misc")
set_target_properties(liblldb-resource-headers PROPERTIES FOLDER "LLDB/Resources")
add_dependencies(liblldb liblldb-resource-headers)

# At build time, copy the staged headers into the framework bundle (and do
Expand Down
4 changes: 2 additions & 2 deletions lldb/cmake/modules/LLDBStandalone.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ if(LLVM_USE_FOLDERS)
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
endif()

set_target_properties(clang-tablegen-targets PROPERTIES FOLDER "lldb misc")
set_target_properties(intrinsics_gen PROPERTIES FOLDER "lldb misc")
set_target_properties(clang-tablegen-targets PROPERTIES FOLDER "Clang/Tablegenning")
set_target_properties(intrinsics_gen PROPERTIES FOLDER "LLVM/Tablegenning")

if(NOT DEFINED LLVM_COMMON_CMAKE_UTILS)
set(LLVM_COMMON_CMAKE_UTILS ${CMAKE_CURRENT_SOURCE_DIR}/../cmake)
Expand Down
1 change: 1 addition & 0 deletions lldb/docs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ if(DOXYGEN_FOUND)
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMENT "Generating LLDB C++ API reference with Doxygen" VERBATIM
)
set_target_properties(lldb-cpp-doc PROPERTIES FOLDER "LLDB/Docs")
endif()

if (LLVM_ENABLE_SPHINX)
Expand Down
2 changes: 0 additions & 2 deletions lldb/source/API/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
"Only the SB API is guaranteed to be stable.")
add_llvm_symbol_exports(liblldb "${LLDB_EXPORT_ALL_SYMBOLS_EXPORTS_FILE}")
endif()
set_target_properties(liblldb_exports PROPERTIES FOLDER "lldb misc")
elseif (LLDB_EXPORT_ALL_SYMBOLS)
MESSAGE("-- Symbols (liblldb): exporting all symbols from the lldb and lldb_private namespaces")

Expand Down Expand Up @@ -232,7 +231,6 @@ elseif (LLDB_EXPORT_ALL_SYMBOLS)
)

add_llvm_symbol_exports(liblldb ${exported_symbol_file})
set_target_properties(liblldb_exports PROPERTIES FOLDER "lldb misc")
endif()

if (NOT MSVC)
Expand Down
1 change: 1 addition & 0 deletions lldb/test/API/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
add_custom_target(lldb-api-test-deps)
set_target_properties(lldb-api-test-deps PROPERTIES FOLDER "LLDB/Tests")
add_dependencies(lldb-api-test-deps lldb-test-depends)

add_lit_testsuites(LLDB-API
Expand Down
4 changes: 2 additions & 2 deletions lldb/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,11 @@ string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLDB_TOOLS_DIR ${LLVM_RUNT

# Create a custom target to track test dependencies.
add_custom_target(lldb-test-depends)
set_target_properties(lldb-test-depends PROPERTIES FOLDER "lldb misc")
set_target_properties(lldb-test-depends PROPERTIES FOLDER "LLDB/Tests")

# Create an alias for the legacy name of lldb-test-depends
add_custom_target(lldb-test-deps)
set_target_properties(lldb-test-deps PROPERTIES FOLDER "LLDB/Tests")
add_dependencies(lldb-test-deps lldb-test-depends)

function(add_lldb_test_dependency)
Expand Down Expand Up @@ -265,7 +266,6 @@ add_lit_testsuite(check-lldb "Running lldb lit test suite"
lldb-api-test-deps
lldb-shell-test-deps
lldb-unit-test-deps)
set_target_properties(check-lldb PROPERTIES FOLDER "lldb tests")

if(LLDB_BUILT_STANDALONE)
# This has to happen *AFTER* add_lit_testsuite.
Expand Down
1 change: 1 addition & 0 deletions lldb/test/Shell/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
add_custom_target(lldb-shell-test-deps)
set_target_properties(lldb-shell-test-deps PROPERTIES FOLDER "LLDB/Tests")
add_dependencies(lldb-shell-test-deps lldb-test-depends)

add_lit_testsuites(LLDB-SHELL
Expand Down
1 change: 1 addition & 0 deletions lldb/test/Unit/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
add_custom_target(lldb-unit-test-deps)
set_target_properties(lldb-unit-test-deps PROPERTIES FOLDER "LLDB/Tests")
add_dependencies(lldb-unit-test-deps lldb-test-depends)

add_lit_testsuites(LLDB-UNIT
Expand Down
2 changes: 0 additions & 2 deletions lldb/tools/driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ add_dependencies(lldb
${tablegen_deps}
)

set_target_properties(LLDBOptionsTableGen PROPERTIES FOLDER "lldb misc")

if(LLDB_BUILD_FRAMEWORK)
# In the build-tree, we know the exact path to the framework directory.
# The installed framework can be in different locations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ if(TARGET lldb-commandinterpreter-fuzzer)
COMMAND $<TARGET_FILE:lldb-commandinterpreter-fuzzer> -dict=${CMAKE_CURRENT_SOURCE_DIR}/inputdictionary.txt -only_ascii=1 -artifact_prefix=commandinterpreter-
USES_TERMINAL
)
set_target_properties(fuzz-lldb-commandinterpreter PROPERTIES FOLDER "LLDB/Fuzzer")
endif()
1 change: 1 addition & 0 deletions lldb/tools/lldb-fuzzer/lldb-target-fuzzer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ if(TARGET lldb-target-fuzzer)
COMMAND $<TARGET_FILE:lldb-target-fuzzer> -artifact_prefix=target-
USES_TERMINAL
)
set_target_properties(fuzz-lldb-target PROPERTIES FOLDER "LLDB/Fuzzer")
endif()
1 change: 0 additions & 1 deletion lldb/tools/lldb-server/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
set(LLVM_TARGET_DEFINITIONS LLGSOptions.td)
tablegen(LLVM LLGSOptions.inc -gen-opt-parser-defs)
add_public_tablegen_target(LLGSOptionsTableGen)
set_target_properties(LLGSOptionsTableGen PROPERTIES FOLDER "lldb misc")

set(LLDB_PLUGINS)

Expand Down
2 changes: 1 addition & 1 deletion lldb/unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_custom_target(LLDBUnitTests)
set_target_properties(LLDBUnitTests PROPERTIES FOLDER "lldb tests")
set_target_properties(LLDBUnitTests PROPERTIES FOLDER "LLDB/Tests")

add_dependencies(lldb-unit-test-deps LLDBUnitTests)

Expand Down
2 changes: 1 addition & 1 deletion lldb/unittests/tools/lldb-server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function(add_lldb_test_executable test_name)
set_output_directory(${test_name} BINARY_DIR ${outdir} LIBRARY_DIR ${outdir})
list(APPEND ALL_LLDB_TEST_EXECUTABLES ${test_name})
set(ALL_LLDB_TEST_EXECUTABLES ${ALL_LLDB_TEST_EXECUTABLES} PARENT_SCOPE)
set_target_properties(${test_name} PROPERTIES FOLDER "lldb tests")
set_target_properties(${test_name} PROPERTIES FOLDER "LLDB/Tests")
endfunction()

add_lldb_test_executable(thread_inferior inferior/thread_inferior.cpp)
Expand Down
1 change: 0 additions & 1 deletion lldb/utils/TableGen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@ if (NOT DEFINED LLDB_TABLEGEN_EXE)
LLDBTableGen.cpp
LLDBTableGenUtils.cpp
)
set_target_properties(lldb-tblgen PROPERTIES FOLDER "LLDB tablegenning")
endif()
endif()
2 changes: 1 addition & 1 deletion lldb/utils/lit-cpuid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ add_lldb_executable(lit-cpuid
TargetParser
)

set_target_properties(lit-cpuid PROPERTIES FOLDER "lldb utils")
set_target_properties(lit-cpuid PROPERTIES FOLDER "LLDB/Utils")
2 changes: 1 addition & 1 deletion lldb/utils/lldb-dotest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Make lldb-dotest a custom target.
add_custom_target(lldb-dotest)
add_dependencies(lldb-dotest lldb-test-depends)
set_target_properties(lldb-dotest PROPERTIES FOLDER "lldb utils")
set_target_properties(lldb-dotest PROPERTIES FOLDER "LLDB/Utils")

get_property(LLDB_TEST_USER_ARGS GLOBAL PROPERTY LLDB_TEST_USER_ARGS_PROPERTY)
get_property(LLDB_TEST_COMMON_ARGS GLOBAL PROPERTY LLDB_TEST_COMMON_ARGS_PROPERTY)
Expand Down
2 changes: 1 addition & 1 deletion lldb/utils/lldb-repro/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
add_custom_target(lldb-repro)
add_dependencies(lldb-repro lldb-test-depends)
set_target_properties(lldb-repro PROPERTIES FOLDER "lldb utils")
set_target_properties(lldb-repro PROPERTIES FOLDER "LLDB/Utils")

# Generate lldb-repro Python script for each build mode.
if(LLDB_BUILT_STANDALONE)
Expand Down
12 changes: 8 additions & 4 deletions llvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ configure_file(
add_custom_target(srpm
COMMAND cpack -G TGZ --config CPackSourceConfig.cmake -B ${LLVM_SRPM_DIR}/SOURCES
COMMAND rpmbuild -bs --define '_topdir ${LLVM_SRPM_DIR}' ${LLVM_SRPM_BINARY_SPECFILE})
set_target_properties(srpm PROPERTIES FOLDER "Misc")
set_target_properties(srpm PROPERTIES FOLDER "LLVM/Misc")

if(APPLE AND DARWIN_LTO_LIBRARY)
set(CMAKE_EXE_LINKER_FLAGS
Expand Down Expand Up @@ -1222,7 +1222,9 @@ if( LLVM_INCLUDE_UTILS )
add_subdirectory(utils/split-file)
add_subdirectory(utils/mlgo-utils)
if( LLVM_INCLUDE_TESTS )
set(LLVM_SUBPROJECT_TITLE "Third-Party/Google Test")
add_subdirectory(${LLVM_THIRD_PARTY_DIR}/unittest ${CMAKE_CURRENT_BINARY_DIR}/third-party/unittest)
set(LLVM_SUBPROJECT_TITLE)
endif()
else()
if ( LLVM_INCLUDE_TESTS )
Expand Down Expand Up @@ -1286,7 +1288,7 @@ if( LLVM_INCLUDE_TESTS )
if(LLVM_ALL_LIT_DEPENDS OR LLVM_ALL_ADDITIONAL_TEST_DEPENDS)
add_dependencies(test-depends ${LLVM_ALL_LIT_DEPENDS} ${LLVM_ALL_ADDITIONAL_TEST_DEPENDS})
endif()
set_target_properties(test-depends PROPERTIES FOLDER "Tests")
set_target_properties(test-depends PROPERTIES FOLDER "LLVM/Tests")
add_dependencies(check-all test-depends)
endif()

Expand Down Expand Up @@ -1343,7 +1345,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
# Installing the headers needs to depend on generating any public
# tablegen'd headers.
add_custom_target(llvm-headers DEPENDS intrinsics_gen omp_gen)
set_target_properties(llvm-headers PROPERTIES FOLDER "Misc")
set_target_properties(llvm-headers PROPERTIES FOLDER "LLVM/Resources")

if (NOT LLVM_ENABLE_IDE)
add_llvm_install_targets(install-llvm-headers
Expand All @@ -1353,7 +1355,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)

# Custom target to install all libraries.
add_custom_target(llvm-libraries)
set_target_properties(llvm-libraries PROPERTIES FOLDER "Misc")
set_target_properties(llvm-libraries PROPERTIES FOLDER "LLVM/Resources")

if (NOT LLVM_ENABLE_IDE)
add_llvm_install_targets(install-llvm-libraries
Expand Down Expand Up @@ -1399,6 +1401,8 @@ if (LLVM_INCLUDE_BENCHMARKS)
set(HAVE_STD_REGEX ON CACHE BOOL "OK" FORCE)
add_subdirectory(${LLVM_THIRD_PARTY_DIR}/benchmark
${CMAKE_CURRENT_BINARY_DIR}/third-party/benchmark)
set_target_properties(benchmark PROPERTIES FOLDER "Third-Party/Google Benchmark")
set_target_properties(benchmark_main PROPERTIES FOLDER "Third-Party/Google Benchmark")
add_subdirectory(benchmarks)
endif()

Expand Down
Loading
Loading