Skip to content

Commit

Permalink
DRi#1781: add pdb files for exported static libraries
Browse files Browse the repository at this point in the history
Updates DR to 29cc677 for pdb files for DR's static libraries, and adds pdb
files for DRMF static libraries for CMake 3.1+ via the COMPILE_PDB_*
properties.

Review-URL: https://codereview.appspot.com/269080043
  • Loading branch information
derekbruening committed Oct 2, 2015
1 parent 4b3d7da commit 09e3d62
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 1 deletion.
15 changes: 15 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,21 @@ endif ()

string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_UPPER)

# i#1781: cmake 2.8.12+ fails to create static lib pdb by default
# XXX: we should share this with DR's copy
macro(add_static_lib_debug_info target dest_dir)
if (WIN32)
if ("${CMAKE_VERSION}" VERSION_EQUAL "3.1" OR
"${CMAKE_VERSION}" VERSION_GREATER "3.1")
append_property_string(TARGET ${target}
COMPILE_PDB_NAME${location_suffix} "${target}"
COMPILE_PDB_OUTPUT_DIRECTORY{location_suffix} "${dest_dir}")
else ()
# We just don't support it for < 3.1
endif ()
endif ()
endmacro()

if (UNIX)
# there's no cmake warning control so we hardcode it
# disabling strict aliasing since giving weird warning I'm not sure how to fix:
Expand Down
1 change: 1 addition & 0 deletions drfuzz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ add_library(drfuzz_static STATIC ${srcs_static} ${external_srcs})
# Set a preferred base to avoid conflict if we can
configure_DynamoRIO_client(drfuzz_static)
configure_drfuzz_target(drfuzz_static "drwrap_static" "drmgr_static" "drsyms_static")
add_static_lib_debug_info(drfuzz_static ${DRMF_INSTALL_BIN})
export_drfuzz_target(drfuzz_static "drwrap_static" "drmgr_static")

# We build a separate static target for internal use that has our
Expand Down
1 change: 1 addition & 0 deletions drsymcache/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ install(FILES drsymcache.h DESTINATION ${DRMF_INSTALL_INC})
add_library(drsymcache_static STATIC ${srcs_static} ${external_srcs})
configure_DynamoRIO_client(drsymcache_static)
configure_drsymcache_target(drsymcache_static "drmgr_static" "drsyms_static")
add_static_lib_debug_info(drsymcache_static ${DRMF_INSTALL_BIN})
export_drsymcache_target(drsymcache_static "drmgr_static" "drsyms_static")

# We build a separate static target for internal use that has our
Expand Down
1 change: 1 addition & 0 deletions drsyscall/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ configure_DynamoRIO_client(drsyscall_static)
use_DynamoRIO_extension(drsyscall_static drmgr_static)
use_DynamoRIO_extension(drsyscall_static drcontainers)
configure_drsyscall_target(drsyscall_static)
add_static_lib_debug_info(drsyscall_static ${DRMF_INSTALL_BIN})
export_drsyscall_target(drsyscall_static "drmgr_static")

# We build a separate static target for internal use that has our
Expand Down
1 change: 1 addition & 0 deletions umbra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ configure_DynamoRIO_client(umbra_static)
use_DynamoRIO_extension(umbra_static drmgr_static)
use_DynamoRIO_extension(umbra_static drcontainers)
configure_umbra_target(umbra_static)
add_static_lib_debug_info(umbra_static ${DRMF_INSTALL_BIN})
export_umbra_target(umbra_static "drmgr_static")

# We build a separate static target for internal use that has our
Expand Down

0 comments on commit 09e3d62

Please sign in to comment.