Skip to content

Commit

Permalink
CMake: fix ddr macro processing on z/OS
Browse files Browse the repository at this point in the history
Ensure that macros from limits.h have correct values on 64bit builds.

Signed-off-by: Devin Nakamura <devinn@ca.ibm.com>
  • Loading branch information
dnakamura committed Apr 15, 2021
1 parent 2ccbf5e commit 5ef8609
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmake/modules/ddr/DDRSetStub.cmake.in
Expand Up @@ -150,6 +150,10 @@ function(process_source_files src_files)
# Adding this option to the command alleviates this issue.
list(APPEND pp_command "-xc++")
endif()
if("@OMR_OS_ZOS@" and "@OMR_ENV_DATA64@")
# we need to set 64 bit code generation to ensure that limits.h macros are set correctly.
list(APPEND pp_command "-Wc,lp64")
endif()
list(APPEND pp_command ${BASE_ARGS} "-E" "${stub_file}")
add_custom_command(
OUTPUT "${annt_file}"
Expand Down

0 comments on commit 5ef8609

Please sign in to comment.