Conversation
When consumed as a subproject, the CMake files could be imported into the parent project where the filenames could collide.
This should silence the warning about Thread_Db versus Thread_DB
* Make libdl/dbghelp private linkage * Remove TBB flags from toolkits that don't use TBB * Remove FindTBB.cmake All supported TBB versions ship as CMake packages, so this is no longer needed. * Remove from-source build option * Create an imported target for TBB used by Dyninst This is needed to force the include directories to be considered 'system' directories so that compiler warnings from TBB sources are ignored * Rename cmake/ThreadingBuildingBlocks.cmake -> cmake/tpls/DyninstTBB.cmake This is needed to keep the namespace clean for DyninstConfig.cmake * Export TBB as part of the Dyninst CMake package This is required by the CMake guidelines: https://cmake.org/cmake/help/latest/guide/importing-exporting/index.html In particular, "All required dependencies of a package must also be found in the package configuration file" * Format DyninstTBB.cmake
* Remove FindBoost.cmake Use the one provided by CMake so we don't have to maintain this one. * Remove from-source build * Remove user-configurable version * Force use of multithreaded libraries We don't need to include Threads here. Boost will do that. * Disable use of statically-linked runtime * Remove Boost_DEBUG * Always enable searching system paths * Unify path calculations, pass to find_package as hints * Clean up comments * Use include_guard * Allow using Boost's CMake package It is now provided by default since 1.70.0 which is the current minimum acceptable version. * Remove rest of cache variables * Remove MSVC-specific template define We can add this back, if we find there are newer VCs still affected. * Make Dyninst::Boost imported interface target This is needed to make the include directories be "system" directories so that warnings in their headers do not propagate into Dyninst. * Do not add Boost as a dependency for all libs * Make find_package QUIET * Use Boost_* variables instead of calculating includes, libs, etc. * Make a header-only wrapper target * Add to Dyninst package * Update CMakeLists * Whitespace formatting * Set Boost_NO_WARN_NEW_VERSIONS * Bump minimum version to 1.71.0
* Rename FindLibDwarf -> FindLibDW * Update FindLibDW * Rename FindLibElf -> FindLibELF * Update FindLibELF * Create FindElfutils * Update FindLibDebuginfod * Update DyninstElfUtils * Update the CMakeLists to use new targets * Use CMP0074 in updated Find modules This enables use of <Package>_ROOT variables when find_package is invoked. * Provide default dummy interface target for ElfUtils::ElfUtils Needed for non-Unix platforms. * Fix rebase bug in CMakeLists.txt * Whitespace * Export DyninstElfUtils * Forward QUIET flag to pkg_check_modules * Forward version to pkg_check_modules * Use lib from pkg-config, if found * Clean up internal variables * Simplify cache variable handling * Whitespace * Use full linkage name for libs returned by pkg-config * Separate out dependent libraries in FindLibDW Some platforms include libelf as a dependency, but IMPORTED_LOCATION accepts only a single entry. Store the rest in IMPORTED_LINK_DEPENDENT_LIBRARIES. * Fix quoting bug in FindLibDW * Fix lib check in FindLibDW * Manually set PC_<XXX>_INCLUDE_DIRS when FindPkgConfig misses it FindPkgConfig uses the output from `pkg-config --cflags-only-I <lib>` to set PC_<XXX>_INCLUDE_DIRS. Because libelf is usually in a system directory, pkg-config will return nothing for this. FindPkgConfig stores the actual includedir variable from the PC file, so we can fetch it from there.
* LibIberty cmake modernization * Use INCLUDE_DIRS directly
* Update FindThread_DB * Update thread_db * Update docs URL
This also provides a dummy target so we don't have to do any additional checking when USE_OpenMP=OFF. We only use OpenMP_CXX, so I didn't create a target for the other languages (C,Fortran).
* Update valgrind * Add version check in Find module * Remove Valgrind_LIBRARIES They are versioned by architecture, so are hard to nail down with find_library. We also don't need them (at least not yet). * Make dummy when ADD_VALGRIND_ANNOTATIONS=OFF * Add compile defs * Update CMakeLists.txt * Make the dummy IMPORTED * Whitespace
This is so the CI version check will work uniformly
This is now deprecated.
We just support the usual configs.
Contributor
Author
|
@kupsch Fixed the dynintAPI_RT.a issue. Let me know if you have any other troubles. I also merged in recent master. |
Contributor
Author
Hosts
Containers
repos
|
Setting this flag forces the linker to use RUNPATH instead of RPATH. This is most useful for working with older RedHat distros.
This reduces the number of transitive links that have to be done by binaries linking against Dyninst.
It's needed in the Module.h public header.
When building from source, versions before 2019.9 incorrectly set the
version in TBBConfigVersion.cmake. For example, 2018.6 sets the version
to 2018.0 because it uses the TBB_{MAJOR,MINOR}_VERSION from tbb_stddef.h
instead of doing the calculation based on the engineering version.
This also unifies the versions required when compiling with gcc and clang.
TBB 2018.6 was released in Oct 2018 and 2019.9 was released in Oct 2019,
so this just bumps the requirement by just a year even though there are
at least 9 releases in between.
The 3.13.* family requires every 'install' to specify a "LIBRARY DESTINATION". We don't need or want that in the custome parseAPI install (line ~130) for exporting the public headers.
Closed
Contributor
|
Any estimate for when this will be merged? |
Contributor
Author
Very soon. I'm out of the office this week, but I would like to finish the testing on this by end of next week. This PR has revealed a host of bugs in Dyninst, so I'm trying to be as thorough as possible with the testing. |
The headers from symtabAPI are still required, even when building with symLite.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1295
Fixes #1210
Fixes #1178
Fixes #1076
Closes #1341
Closes #1116
Closes #707
Closes #1100
Changes to building Dyninst
STERILE_BUILDis now deprecatedENABLE_LTOwas renamed toDYNINST_ENABLE_LTOCMAKE_EXPORT_COMPILE_COMMANDSis no longer set<target>-installhave been removedLIGHTWEIGHT_SYMTAB=ONCMAKE_<LANG>_FLAGSare correctly preserved and override the builtin options<PackageName>_ROOT_DIRnow implies<PackageName>_NO_SYSTEM_PATHSand sets<PackageName>_ROOTCMAKE_PREFIX_PATHCMAKE_PREFIX_PATHcan be disabled withCMAKE_FIND_USE_CMAKE_PATH=OFF-DElfUtils_ROOT_DIR=/some/pathsetsElfUtils_NO_SYSTEM_PATHS=ONandElfUtils_ROOT=/some/pathRPATH handling
set(CMAKE_SKIP_BUILD_RPATH FALSE)set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)Third-party libraries (tpl)
Dyninst::<library>is created for each libraryElfUtils_NO_SYSTEM_PATHS=ONChanges to consuming Dyninst as a CMake project
Dyninst::<library>, e.g.,Dyninst::BoostDYNINST_LIBRARIEShas been removedDYNINST_INCLUDE_DIRis now deprecated and will be removed in a future versionDYNINST_INTERNAL_DEFINESis now deprecated and will be removed in a future versionDYNINST_PLATFORMis now deprecated and will be removed in a future versionfind_package(Dyninst ... COMPONENTS ...)now works correctlyfind_package(Dyninst X.Y.Z)now work correctlyUsers who are not ready to fully migrate to the new Dyninst CMake package may use the following to preserve backward compatibility: