Skip to content

Commit

Permalink
start of work to refactor the docs to use readthedocs (#1256)
Browse files Browse the repository at this point in the history
* Update dependency versions in base container config

This should have been part of #1211

* Docker: adding a workflow for release (#1219)

Currently we do the entire build from scratch for release, and this strategy was chosen
for the cleanest build. However we can use the same strategy as we do for testing
and take advantage of the base container. This PR adds a workflow to do that

Signed-off-by: vsoch <[email protected]>

Co-authored-by: vsoch <[email protected]>

* Remove usage of DW_AT_MIPS_linkage_name (#1223)

This isn't part of DWARF4 or DWARF5.

Co-authored-by: Tim Haines <[email protected]>

* Docker: testing workflow to run libabigail (#1220)

Run libabigail's abidiff to detect ABI breakages between the current PR and the last successful build as well as the current PR and the last release.

* testing workflow to run libabigail!
I am not sure if the artifact is extracted relative or not, so will need to update
the workflow to account for that. This is also a new strategy that will try to
do the new build/retrieval of artifacts from previous containers - have not
tried this yet!

Signed-off-by: vsoch <[email protected]>
Co-authored-by: vsoch <[email protected]>
Co-authored-by: Tim Haines <[email protected]>

* Correctly propagate pc ranges for blocks and local variables (#1226)

- fix valid pc address ranges for local variables that are declared in a
  sub-block (brace, try and catch blocks) of their function
- fix Context class's constructors so they correctly initialize and copy
  all member (use in-class initialize and default constructors)

* Fix warnings with cmake's MINSIZEREL build type (#1235)

- Explicitly define optimization flags for cmake's MINSIZEREL build
  type.  Cmake by default includes -DNDEBUG.  This results in assert
  being defined to do nothing.  Dyninst use asserts as a fatal error
  reporting mechanism and expects assert to not return if the condition
  is always false.  If assert can return then many warnings are
  produced due to this unexpect path.
- Remove defining NDEBUG for REL build types if using the MSC compiler

* Remove BUILD_RT option (#1238)

When not enabled, the dyninstAPI_RT/cmake_install.cmake isn't present.
This has been broken since it was implemented by e1afc69 in 2016.

* Add parsing of names for inlined functions in DWARF (#1237)

* Clean up and enhance debug messages
* Add parsing of names for inlined functions

Co-authored-by: Tim Haines <[email protected]>

* Remove void pointer arithmetic when using Valgrind annotations (#1236)

gcc allows this as an extension by considering sizeof(void) to be 1 (http://gcc.gnu.org/onlinedocs/gcc/Pointer-Arith.html).

* Docker: use more OS packages for dependencies (#1221)

* Docker: use more OS packages for dependencies

This should have been part of #1211.

* Docker: don't build Dyninst through spack for the environment (#1222)

This results in two installations: one in /opt/dyninst-dev/.spack/include and one in /opt/dyninst-dev/install/dyninst. The former is not updated when testing a PR, so causes public header conflicts.

* Docker: use external-tests instead of testsuite in base image (#1209)

This is in preparation for using -Werror when building Dyninst in the Github workflow. The test suite does not currently build cleanly, so we need a different set of tests.

* Docker: make compile warnings fatal (#1242)

* Remove unused git files (#1244)

.gitmodules hasn't been used since the test suite was moved to its own repository.
.github_changelog_generate hasn't been used since v10.0.0

* Improve compiler diagnostic suppression handling (#1239)

- Create compiler specific diagnostic suppression macros to suppress a
  type of warning for a region of code that are consistently defined
  based on the build environment.
- Replace current multi-line preprocessor #if and #pragma statements
  with one macro.
- Add suppression for warnings in instructionAPI/src/Register.C
  when using gcc 6-8.

* Remove MSC compiler warning suppressions (#1239)

Likely no longer needed with current MSC compiler and will hide
problems if MSC is used.

- Removed diagnostic suppressing pragmas
- Removed compiler command line suppression options

* Fix frame-larger-than warning (#1239)

- Increase frame size max when using gcc 6 for non-debug builds and
  for all debug builds (needed for rhel's gcc) to compile
  instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C

* Add cmake option to disable diagnostic suppressions (#1239)

- DYNINST_DISABLE_DIAGNOSTIC_SUPPRESSIONS option:  if set,
  disable all warning suppressions and frame size limit overrides

* Add compiler warning related cmake options (#1239)

- DYNINST_WARNINGS_AS_ERRORS option:  if set, treat warnings as errors
- DYNINST_EXTRA_WARNINGS option:  additional warning options to test for
  and use if valid with the current compiler

* Remove unneeded #pragma's (#1240)

- Remove once and interface pragmas
- Replace use of "external/stdint-win.h" and "external/inttypes.h" with
  <stdint.h> and <inttypes.h>

* remove unused files containing pragmas (#1240)

* Cleanup (remove) ancient linux kernel support (#1241)

- Remove check and message for ancient linux kernel
- Remove support for old mechanism to find process's tasks

* Use bfd linker for LTO (#1248)

The gold linker crashes and is no longer supported.

* Add cmake options for C/C++ language standards (#1246)

Add cmake options to set C/C++ language standard versions used to build
to facilitate testing.

- DYNINST_C_LANGUAGE_STANDARD cmake option:  C Standard version
- DYNINST_CXX_LANGUAGE_STANDARD cmake option:  C++ Standard version

* Make dyninstAPI_RT files build with standard C (#1246)

- use same language standards as the rest of Dyninst
- define _DEFAULT_SOURCE in some dyninstAPI_RT source files so functions
  and macros used are defined when using standard C

* Fix format string errors in stackwalk/callchecker.C (#1250)

These are only present when SW_ANALYSIS_STEPPER=OFF.

* Redo finalization to get correct function boundiaries when (#1249)

there are many tail call correction

* Fix dyninstAPI_RT files to build with older glibc (#1252)

Replace feature test macro _DEFAULT_SOURCE with _GNU_SOURCE to support older version of glibc

* Remove unused build options (#1253)

* Remove BUILD_DOCS

This isn't sufficient to create the documentation as some of it is
contained in MS Word files.

* Remove BUILD_TARBALLS

We don't distrubute tarballs anymore. That's handled by GitHub.

* start of work to refactor the docs to use readthedocs

this is the first pass to format the previous latex into rst. I have done the conversion and
only started to go through ensuring that content is preserved (meaning I did not miss anything)
and all the code blocks are formatted (after the automated conversion they indeed are not!) I
will want a few more hours to finish this up, and then we need to discuss deployment. E.g., I
recommend readthedocs so you can automate deployment and keep versioned docs. We can also deploy
to github pages (I can make a workflow) but I do not have a good suggestion for versioning things
that way. I also have not added in an ability to still render the pdfs if that is desired, which
I think should be possibly. Finally, it would be nice if some of these docs could render from
docstrings - I know how to do this for Python so I wonder if Cpp is that much different. It is
probably terrible because it is cpp, but what can you do?

Signed-off-by: vsoch <[email protected]>

* adding missing figures and re-creating tables in format that will render

Signed-off-by: vsoch <[email protected]>

* use different version of checkout to get around checkout bug

Signed-off-by: vsoch <[email protected]>

* try fix for gha

Signed-off-by: vsoch <[email protected]>

Signed-off-by: vsoch <[email protected]>
Co-authored-by: Tim Haines <[email protected]>
Co-authored-by: vsoch <[email protected]>
Co-authored-by: Tim Haines <[email protected]>
Co-authored-by: kupsch <[email protected]>
Co-authored-by: Xiaozhu Meng <[email protected]>
  • Loading branch information
6 people committed Dec 13, 2022
1 parent 3937542 commit 434a5af
Show file tree
Hide file tree
Showing 168 changed files with 14,841 additions and 32,524 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/libabigail.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Build Pull Request
<<<<<<< HEAD
uses: actions/checkout@v3
=======
uses: actions/[email protected]
>>>>>>> a4a1c176a (start of work to refactor the docs to use readthedocs (#1256))
- name: Build
run: |
rm -rf /code
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -125,3 +125,5 @@ cmake-build-*/
.cproject
.settings
.pydevproject
docs/env
docs/_build
59 changes: 59 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ if(${SYMREADER} MATCHES symtabAPI)
add_subdirectory(parseThat)
endif()

<<<<<<< HEAD
add_subdirectory(dyninstAPI_RT)

set(ENABLE_STATIC_LIBS
Expand All @@ -107,6 +108,64 @@ set(ENABLE_STATIC_LIBS
set(VERSION_STRING
"${DYNINST_MAJOR_VERSION}.${DYNINST_MINOR_VERSION}.${DYNINST_PATCH_VERSION}")
set(DYNINST_NAME "DyninstAPI-${VERSION_STRING}")
=======
# Build the RT library as a separate project so we can change compilers
message(STATUS "Configuring DyninstAPI_RT in ${RT_BINARY_DIR}")
file(REMOVE_RECURSE ${RT_BINARY_DIR}/CMakeCache.txt ${RT_BINARY_DIR}/CMakeFiles ${RT_BINARY_DIR}/Makefile)
file(MAKE_DIRECTORY ${RT_BINARY_DIR})
set (RT_C_COMPILER ${CMAKE_C_COMPILER} CACHE STRING "Compiler for runtime library")
set (ENABLE_STATIC_LIBS NO CACHE STRING "Build static libraries as well?")
message(STATUS "Configuring RT library")

execute_process(WORKING_DIRECTORY ${RT_BINARY_DIR}
COMMAND ${CMAKE_COMMAND}
"-DCMAKE_C_COMPILER=${RT_C_COMPILER}"
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
"-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}"
"-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}"
"-DINSTALL_LIB_DIR=${INSTALL_LIB_DIR}"
"-DINSTALL_INCLUDE_DIR=${INSTALL_INCLUDE_DIR}"
"-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}"
"-DBUILD_RTLIB_32=${BUILD_RTLIB_32}"
"-DPLATFORM=${PLATFORM}"
"-DDYNINST_DISABLE_DIAGNOSTIC_SUPPRESSIONS=${DYNINST_DISABLE_DIAGNOSTIC_SUPPRESSIONS}"
"-DDYNINST_EXTRA_WARNINGS=${DYNINST_EXTRA_WARNINGS}"
"-DDYNINST_WARNINGS_AS_ERRORS=${DYNINST_WARNINGS_AS_ERRORS}"
"-DDYNINST_CXX_LANGUAGE_STANDARD=${DYNINST_CXX_LANGUAGE_STANDARD}"
"-DDYNINST_C_LANGUAGE_STANDARD=${DYNINST_C_LANGUAGE_STANDARD}"
-G "${CMAKE_GENERATOR}"
-B "${RT_BINARY_DIR}"
-S "${RT_SOURCE_DIR}")
find_file(${RT_MAKEFILE} Makefile PATHS ${RT_BINARY_DIR} NO_DEFAULT_PATH)
message(STATUS "RTlib Makefile: ${RT_MAKEFILE}")
if(MSVC)
include_external_msproject(DyninstAPI_RT dyninstAPI_RT/dyninstAPI_RT.vcxproj)
include_external_msproject(DyninstAPI_RT_static dyninstAPI_RT/dyninstAPI_RT_static.vcxproj)
else()
add_custom_target(DyninstRT
ALL
$(MAKE)
WORKING_DIRECTORY ${RT_BINARY_DIR}
COMMENT "Building DyninstRT")
if(TARGET TBB)
add_dependencies(DyninstRT TBB)
endif()
if(TARGET dyninstAPI)
add_dependencies(dyninstAPI DyninstRT)
endif()
if(TARGET dyninstAPI-static)
add_dependencies(dyninstAPI-static DyninstRT)
endif()
if(TARGET boost)
add_dependencies(DyninstRT boost)
endif()
endif()

install(SCRIPT "${RT_BINARY_DIR}/cmake_install.cmake")

set (VERSION_STRING "${DYNINST_MAJOR_VERSION}.${DYNINST_MINOR_VERSION}.${DYNINST_PATCH_VERSION}")
set (DYNINST_NAME "DyninstAPI-${VERSION_STRING}")
>>>>>>> a4a1c176a (start of work to refactor the docs to use readthedocs (#1256))

if(TARGET boost)
add_dependencies(common boost)
Expand Down
5 changes: 5 additions & 0 deletions cmake/LanguageStandards.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,17 @@
# C/C++ language standard cmake options.
#

<<<<<<< HEAD
set(DYNINST_CXX_LANGUAGE_STANDARD
"11"
CACHE STRING "C++ language standard version.")
set(DYNINST_C_LANGUAGE_STANDARD
"11"
CACHE STRING "C language standard version.")
=======
set(DYNINST_CXX_LANGUAGE_STANDARD "11" CACHE STRING "C++ language standard version.")
set(DYNINST_C_LANGUAGE_STANDARD "11" CACHE STRING "C language standard version.")
>>>>>>> a4a1c176a (start of work to refactor the docs to use readthedocs (#1256))

#
# -------- C++ language features ----------------
Expand Down
36 changes: 36 additions & 0 deletions cmake/optimization.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< HEAD
if(CMAKE_COMPILER_IS_GNUCXX
OR ${CMAKE_C_COMPILER_ID} MATCHES Clang
OR ${CMAKE_C_COMPILER_ID} MATCHES GNU
Expand All @@ -11,20 +12,45 @@ if(CMAKE_COMPILER_IS_GNUCXX
endif()
set(CMAKE_C_FLAGS_DEBUG "-Og -g3")
set(CMAKE_CXX_FLAGS_DEBUG "-Og -g3")
=======
if (CMAKE_COMPILER_IS_GNUCXX
OR ${CMAKE_C_COMPILER_ID} MATCHES Clang
OR ${CMAKE_C_COMPILER_ID} MATCHES GNU
OR ${CMAKE_C_COMPILER_ID} MATCHES Intel)
if(ENABLE_LTO)
set(LTO_FLAGS "-flto")
set(LTO_LINK_FLAGS "-fuse-ld=bfd")
else()
set(LTO_FLAGS "")
set(LTO_LINK_FLAGS "")
endif()
set (CMAKE_C_FLAGS_DEBUG "-Og -g3")
set (CMAKE_CXX_FLAGS_DEBUG "-Og -g3")
>>>>>>> a4a1c176a (start of work to refactor the docs to use readthedocs (#1256))

set(CMAKE_C_FLAGS_RELEASE "-O2 ${LTO_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "-O2 ${LTO_FLAGS}")

set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g3 ${LTO_FLAGS}")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g3 ${LTO_FLAGS}")

<<<<<<< HEAD
set(CMAKE_C_FLAGS_MINSIZEREL "-Os ${LTO_FLAGS}")
set(CMAKE_CXX_FLAGS_MINSIZEREL "-Os ${LTO_FLAGS}")
=======
set (CMAKE_C_FLAGS_MINSIZEREL "-Os ${LTO_FLAGS}")
set (CMAKE_CXX_FLAGS_MINSIZEREL "-Os ${LTO_FLAGS}")

set (FORCE_FRAME_POINTER "-fno-omit-frame-pointer")
# Ensure each library is fully linked
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
>>>>>>> a4a1c176a (start of work to refactor the docs to use readthedocs (#1256))

set(FORCE_FRAME_POINTER "-fno-omit-frame-pointer")
# Ensure each library is fully linked
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")

<<<<<<< HEAD
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${LTO_LINK_FLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${LTO_LINK_FLAGS}")
else(MSVC)
Expand All @@ -40,6 +66,16 @@ else(MSVC)

set(CMAKE_C_FLAGS_RELEASE "/MP /O2 /MD ${LTO_FLAGS}")
set(CMAKE_CXX_FLAGS_RELEASE "/MP /O2 /MD ${LTO_FLAGS}")
=======
set (CMAKE_C_FLAGS_RELEASE "/MP /O2 /MD ${LTO_FLAGS}")
set (CMAKE_CXX_FLAGS_RELEASE "/MP /O2 /MD ${LTO_FLAGS}")

set (CMAKE_C_FLAGS_RELWITHDEBINFO "/MP /O2 /Zi /MD ${LTO_FLAGS}")
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MP /O2 /Zi /MD ${LTO_FLAGS}")

set (CMAKE_C_FLAGS_MINSIZEREL "/MP /O1 /MD ${LTO_FLAGS}")
set (CMAKE_CXX_FLAGS_MINSIZEREL "/MP /O1 /MD ${LTO_FLAGS}")
>>>>>>> a4a1c176a (start of work to refactor the docs to use readthedocs (#1256))

set(CMAKE_C_FLAGS_RELWITHDEBINFO "/MP /O2 /Zi /MD ${LTO_FLAGS}")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MP /O2 /Zi /MD ${LTO_FLAGS}")
Expand Down
6 changes: 6 additions & 0 deletions cmake/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,15 @@ option(
# Use ParseAPI analysis in Stackwalker?
option(SW_ANALYSIS_STEPPER "Use ParseAPI-based analysis stepper in Stackwalker" ON)

<<<<<<< HEAD
option(BUILD_RTLIB_32 "Build 32-bit runtime library on mixed 32/64 systems" OFF)

option(ENABLE_LTO "Enable Link-Time Optimization" OFF)
=======
option (BUILD_RTLIB_32 "Build 32-bit runtime library on mixed 32/64 systems" OFF)

option (ENABLE_LTO "Enable Link-Time Optimization" OFF)
>>>>>>> a4a1c176a (start of work to refactor the docs to use readthedocs (#1256))

option(ENABLE_DEBUGINFOD "Enable debuginfod support" OFF)

Expand Down
90 changes: 90 additions & 0 deletions cmake/warnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# cmake warning options
#

<<<<<<< HEAD
option(DYNINST_DISABLE_DIAGNOSTIC_SUPPRESSIONS
"Disable all warning suppressions and frame size overrides." OFF)

Expand All @@ -25,6 +26,24 @@ endif()
# Frame sizes are larger for debug build, so adjust based on build type files with
# functions containing large frames are adjust below (the value could be made
# significantly maller if more files are adjusted).
=======
option(DYNINST_DISABLE_DIAGNOSTIC_SUPPRESSIONS "Disable all warning suppressions and frame size overrides." OFF)

set(DYNINST_EXTRA_WARNINGS "" CACHE STRING "Additional warning options to enable if available. ;-separated without leading '-' (Wopt1[;Wopt2]...).")

option(DYNINST_WARNINGS_AS_ERRORS "Treat compilation warnings as errors" OFF)


if (DYNINST_DISABLE_DIAGNOSTIC_SUPPRESSIONS)
add_definitions(-DDYNINST_DIAGNOSTIC_NO_SUPPRESSIONS)
message(STATUS "DYNINST_DISABLE_DIAGNOSTIC_SUPPRESSIONS set: disabling all dyninst warning suppressions and frame size overrides")
endif()


# Frame sizes are larger for debug build, so adjust based on build type
# files with functions containing large frames are adjust below
# (the value could be made significantly maller if more files are adjusted).
>>>>>>> a4a1c176a (start of work to refactor the docs to use readthedocs (#1256))
#
set(defaultDebugMaxFrameSize 24576)
set(defaultNonDebugMaxFrameSize 20480)
Expand Down Expand Up @@ -85,12 +104,57 @@ list(
# Wsign-promo) list(APPEND REQUESTED_WARNING_FLAGS Wold-style-cast) list(APPEND
# REQUESTED_WARNING_FLAGS Walloc-zero)

<<<<<<< HEAD
if(DYNINST_EXTRA_WARNINGS)
list(APPEND REQUESTED_WARNING_FLAGS ${DYNINST_EXTRA_WARNINGS})
message(
STATUS
"DYNINST_EXTRA_WARNINGS set, adding extra warnings: ${DYNINST_EXTRA_WARNINGS}"
)
=======
#list(APPEND REQUESTED_WARNING_FLAGS Werror)

#list(APPEND REQUESTED_WARNING_FLAGS Wredundant-tags)
#list(APPEND REQUESTED_WARNING_FLAGS Wnull-dereference)
#list(APPEND REQUESTED_WARNING_FLAGS Wconversion)
#list(APPEND REQUESTED_WARNING_FLAGS Wzero-as-null-pointer-constant)
#list(APPEND REQUESTED_WARNING_FLAGS Wuseless-cast)
#list(APPEND REQUESTED_WARNING_FLAGS Wsuggest-override)
#list(APPEND REQUESTED_WARNING_FLAGS Wsuggest-final-types)
#list(APPEND REQUESTED_WARNING_FLAGS Wsuggest-final-methods)
#list(APPEND REQUESTED_WARNING_FLAGS Wsign-promo)
#list(APPEND REQUESTED_WARNING_FLAGS Wold-style-cast)
#list(APPEND REQUESTED_WARNING_FLAGS Walloc-zero)

if (DYNINST_EXTRA_WARNINGS)
list(APPEND REQUESTED_WARNING_FLAGS ${DYNINST_EXTRA_WARNINGS})
message(STATUS "DYNINST_EXTRA_WARNINGS set, adding extra warnings: ${DYNINST_EXTRA_WARNINGS}")
endif()

if (DYNINST_WARNINGS_AS_ERRORS)
list(APPEND REQUESTED_WARNING_FLAGS "Werror")
message(STATUS "DYNINST_WARNINGS_AS_ERRORS set: treating warnings as errors")
endif()

if (CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang)$")
include(CheckCCompilerFlag)
foreach (f IN LISTS REQUESTED_WARNING_FLAGS)
string(REGEX REPLACE "[^a-zA-Z0-9]" "_" v "HAS_C_FLAG_${f}")
set(CMAKE_REQUIRED_FLAGS "-${f}")
check_c_source_compiles("int main(){return 0;}" "${v}" FAIL_REGEX "warning: *command[- ]line option|-Wunknown-warning-option")
# Previous two lines are equivalent to below, but also catches
# a 0 exit status with a warning message output:
# check_c_compiler_flag("-${f}" "${v}")
if (${v})
string(APPEND SUPPORTED_C_WARNING_FLAGS " -${f}")
if (f MATCHES "^(.*)=[0-9]+$")
# set generic variable if warning is parameterized with a number
string(REGEX REPLACE "[^a-zA-Z0-9]" "_" v "HAS_C_FLAG_${CMAKE_MATCH_1}")
set("${v}" 1)
endif()
endif()
endforeach()
>>>>>>> a4a1c176a (start of work to refactor the docs to use readthedocs (#1256))
endif()

if(DYNINST_WARNINGS_AS_ERRORS)
Expand All @@ -104,6 +168,7 @@ if(DYNINST_WARNINGS_AS_ERRORS)
endif()
endif()

<<<<<<< HEAD
if(CMAKE_C_COMPILER_ID MATCHES "^(GNU|Clang)$")
include(CheckCCompilerFlag)
foreach(f IN LISTS REQUESTED_WARNING_FLAGS)
Expand Down Expand Up @@ -155,6 +220,21 @@ endif()
if(HAS_CPP_FLAG_Wframe_larger_than AND NOT DYNINST_DISABLE_DIAGNOSTIC_SUPPRESSIONS)
# Override the default frame size maximum for DEBUG (-O0) build types as there stack
# frames are larger:
=======
# If -Wframe-larger-than is available adjust the value to allow for larger
# frames based on compiler version and build type for the following 3 files:
#
# instructionAPI/src/InstructionDecoder-power.C
# (includes instructionAPI/src/power-opcode-table.C)
# instructionAPI/src/AMDGPU/cdna2/InstructionDecoder-amdgpu-cdna2.C
# (includes instructionAPI/src/AMDGPU/cdna2/finalizeOperands.C)
# common/src/MachSyscall.C
# (includes common/src/SyscallInformation.C)
#
if (HAS_CPP_FLAG_Wframe_larger_than AND NOT DYNINST_DISABLE_DIAGNOSTIC_SUPPRESSIONS)
# Override the default frame size maximum for DEBUG (-O0) build types
# as there stack frames are larger:
>>>>>>> a4a1c176a (start of work to refactor the docs to use readthedocs (#1256))
#
add_compile_options(
$<$<CONFIG:DEBUG>:-Wframe-larger-than=${defaultDebugMaxFrameSize}>)
Expand All @@ -174,12 +254,22 @@ if(HAS_CPP_FLAG_Wframe_larger_than AND NOT DYNINST_DISABLE_DIAGNOSTIC_SUPPRESSIO
if(${CMAKE_CXX_COMPILER_VERSION} MATCHES "^[6](\.|$)")
set(nonDebugMaxFrameSizeOverrideFinalizeOperands 30000)
endif()
# most gcc's are under the default using -Og, but rhel's requires 30000
set(debugMaxFrameSizeOverrideFinalizeOperands 30000)
if (${CMAKE_CXX_COMPILER_VERSION} MATCHES "^[6](\.|$)")
set(nonDebugMaxFrameSizeOverrideFinalizeOperands 30000)
endif()
endif()

unset(CMAKE_REQUIRED_FLAGS)

<<<<<<< HEAD
if(MSVC)
message(STATUS "TODO: Set up custom warning flags for MSVC")
=======
if (MSVC)
message(STATUS "TODO: Set up custom warning flags for MSVC")
>>>>>>> a4a1c176a (start of work to refactor the docs to use readthedocs (#1256))
endif()

message(STATUS "Using C warning flags: ${SUPPORTED_C_WARNING_FLAGS}")
Expand Down
30 changes: 0 additions & 30 deletions common/doc/manual_commands.tex

This file was deleted.

Loading

0 comments on commit 434a5af

Please sign in to comment.