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

Migrate z/OS to a CMake build system #3693

Merged
merged 44 commits into from
Jun 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
de2f16b
Add "zOS" as an xlc compiler ID for xlc++ on z/OS
fjeremic Mar 20, 2019
a752987
Tweak z/OS and xlc CMake definitions to support z/OS
fjeremic Mar 20, 2019
1ce05c9
Define OMR_EBCDIC in CMake z/OS builds
fjeremic Mar 20, 2019
692d5d9
Add zbarrier.s in z/OS CMakeLists
fjeremic Mar 20, 2019
812ab95
Deprecate J9VM_TIERED_CODE_CACHE and MAXMOVE defines
fjeremic Mar 20, 2019
2cf4cdf
Add missing z/OS compiler command line defines
fjeremic Mar 20, 2019
e9e4cb6
Add missing xlc z/OS compiler options
fjeremic Mar 20, 2019
cfed657
Override MAP_ANONYMOUS and MAP_ANON for z/OS
fjeremic Mar 20, 2019
e70c6c1
Add hacks for z/OS to work around mmap limitations
fjeremic Mar 20, 2019
75c5bd9
Fix undefined references to int16_t on z/OS
fjeremic Mar 20, 2019
7e9780d
Fix template issues with std::map on z/OS
fjeremic Mar 20, 2019
eabda10
Add workaround for xlc on z/OS with private delete operators
fjeremic Mar 20, 2019
ba67cf1
Define OMR_PLATFORM_THREAD_LIBRARY for z/OS
fjeremic Mar 20, 2019
b6093d1
Add -qnocsect for z/OS compiles
fjeremic Mar 21, 2019
10e9a4e
Relax JitBuilder API generator Python version requirement
fjeremic Apr 5, 2019
5f3d2e2
Implement FindLEX CMake module
fjeremic May 17, 2019
099e4f1
Implement FindYACC CMake module
fjeremic May 17, 2019
6a6d5e2
Modify tril.l to accommodate Lex
fjeremic May 17, 2019
c822c77
Modify tril.y to accommodate Yacc
fjeremic May 17, 2019
d1f8a2b
Use Lex and Yacc in the Tril CMake target
fjeremic May 17, 2019
e8c40f0
Relax C++11 usage in Tril to accomodate z/OS
fjeremic May 17, 2019
345dfe7
Deprecate use of initializer_list because it's not supported on z/OS
fjeremic May 17, 2019
2b19fa2
Enable GTest <tuple> on z/OS
fjeremic May 17, 2019
b1d65d1
Allow use of _ISOC99_SOURCE and __IBMCPP_TR1__ on the command line
fjeremic May 17, 2019
d5fe55e
Define _ISOC99_SOURCE for all z/OS compiles and remove IBM_ATOE
fjeremic May 17, 2019
bed93ca
Define YYLMAX for Lex token limit and clean up xlc compiler directives
fjeremic May 17, 2019
c25cf61
Add j9a2e as a link target of comptest
fjeremic May 17, 2019
7102775
Change BC to an RX-a instruction format
fjeremic May 17, 2019
ed3218d
Relax C++11 usage within Tril tests cases to accommodate z/OS
fjeremic May 17, 2019
b250003
Guard ASCII to/from EBCDIC runtime conversions with !defined(OMR_EBCDIC)
fjeremic May 20, 2019
3a4116c
Install omrsig import library alongside the shared library
fjeremic May 20, 2019
90acbcc
Export OnLoad* symbols for all agent test libraries
fjeremic May 20, 2019
e6eed69
Relax C++11 usage in JitBuilder tests for z/OS
fjeremic May 20, 2019
c2db0a7
Avoid use of std::to_string as z/OS does not support it
fjeremic May 20, 2019
331a8a2
Avoid death tests as ExitedWithCode is not defined on z/OS
fjeremic May 21, 2019
7ca7875
Relax usage of C++11 in compilertests and tril/test
fjeremic May 21, 2019
bde2a19
Use CMake build system for z/OS PR builds
fjeremic May 21, 2019
2ea49a2
Enable -DGTEST_ENV_HAS_STD_TUPLE_ only on z/OS and fix copyrights
fjeremic May 22, 2019
9f00e13
Remove UT_DIRECT_TRACE_REGISTRATION define from z/OS
fjeremic May 24, 2019
79357fd
Fixup whitespace, comments, and additional copyrights in LEX and YACC
fjeremic May 24, 2019
b7ecc9a
Tweak CMake handling on z/OS
dnakamura Jun 3, 2019
a49da9d
Remove unnecessary references to J9ZOS390 in z/OS specific files
dnakamura Jun 3, 2019
2c6cfc1
Fix formatting and properly use HOST_BITS on Z
fjeremic Jun 7, 2019
b32943b
Enable OMR to build with OMR_USE_NATIVE_ENCODING=OFF but enable it by…
fjeremic Jun 10, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,24 @@ target_include_directories(omr_base
$<INSTALL_INTERFACE:${OMR_INSTALL_INC_DIR}>
)

if(OMR_OS_ZOS)
if(OMR_USE_NATIVE_ENCODING)
target_link_libraries(omr_base INTERFACE omr_ebcdic)
target_compile_definitions(omr_base
INTERFACE
-DOMR_EBCDIC
)
install(TARGETS omr_ebcdic
EXPORT OmrTargets
)
else()
target_link_libraries(omr_base INTERFACE omr_ascii)
install(TARGETS omr_ascii
EXPORT OmrTargets
)
endif()
endif()

install(
TARGETS omr_base
EXPORT OmrTargets
Expand Down
40 changes: 11 additions & 29 deletions buildenv/jenkins/jobs/pull-requests/PullRequest-zos_390-64
Original file line number Diff line number Diff line change
Expand Up @@ -14,41 +14,23 @@ pipeline {
stage('Build') {
steps {
timestamps {
//echo 'Output CCACHE stats before running and clear them'
//echo '''ccache -s -z'''

echo 'Configure...'
sh'''make -f run_configure.mk OMRGLUE=./example/glue SPEC=zos_390-64'''

echo 'Convert HDF files to EBCDIC'
//sh'''for file in `find . -name '*.hdf'`;do;mv "$file" "$file.iso88591";iconv -f ISO8859-1 -t IBM-1047 "$file.iso88591" >"$file" && chtag -tc IBM-1047 "$file";done'''
//sh'''for file in `find . -name '*.hdf'`;do; chtag -p "$file" | grep -q "ISO8859-1"; if [[ $? == 0 ]]; then; mv "$file" "$file.iso88591";iconv -f ISO8859-1 -t IBM-1047 "$file.iso88591" >"$file" && chtag -tc IBM-1047 "$file"; fi; done'''
sh'''for file in `find . -name '*.hdf'`;do; chtag -p "$file" | grep -q "ISO8859-1"; if [ $? -eq 0 ]; then; mv "$file" "$file.iso88591";iconv -f ISO8859-1 -t IBM-1047 "$file.iso88591" >"$file" && chtag -tc IBM-1047 "$file"; fi; done'''

echo 'Convert TDF files to EBCDIC'
//sh'''for file in `find . -name '*.tdf'`;do;mv "$file" "$file.iso88591";iconv -f ISO8859-1 -t IBM-1047 "$file.iso88591" >"$file" && chtag -tc IBM-1047 "$file";done'''
//sh'''for file in `find . -name '*.tdf'`;do; chtag -p "$file" | grep -q "ISO8859-1"; if [[ $? == 0 ]]; then; mv "$file" "$file.iso88591";iconv -f ISO8859-1 -t IBM-1047 "$file.iso88591" >"$file" && chtag -tc IBM-1047 "$file"; fi; done
sh'''for file in `find . -name '*.tdf'`;do; chtag -p "$file" | grep -q "ISO8859-1"; if [ $? -eq 0 ]; then; mv "$file" "$file.iso88591";iconv -f ISO8859-1 -t IBM-1047 "$file.iso88591" >"$file" && chtag -tc IBM-1047 "$file"; fi; done'''

echo 'Compile...'
sh'''make -j4'''

//echo 'Output CCACHE stats after running'
//echo '''ccache -s'''
dir('build') {
echo 'Configure...'
sh '''cmake -Wdev -C../cmake/caches/Travis.cmake -DCMAKE_C_COMPILER=/bin/c89 -DCMAKE_CXX_COMPILER=/bin/xlc -DOMR_DDR=0 -DOMR_THR_FORK_SUPPORT=0 ..'''
fjeremic marked this conversation as resolved.
Show resolved Hide resolved

echo 'Compile...'
sh '''make -j4'''
fjeremic marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
}
stage('Test') {
steps {
timestamps {
echo "Sanity Test..."

// Workaround: Convert XML files to EBCDIC
//sh'''for file in `find . -name '*.xml'`;do;mv "$file" "$file.iso88591";iconv -f ISO8859-1 -t IBM-1047 "$file.iso88591" >"$file" && chtag -tc IBM-1047 "$file";done'''
sh'''for file in `find . -name '*.xml'`;do; chtag -p "$file" | grep -q "ISO8859-1"; if [ $? -eq 0 ]; then; mv "$file" "$file.iso88591";iconv -f ISO8859-1 -t IBM-1047 "$file.iso88591" >"$file" && chtag -tc IBM-1047 "$file"; fi; done'''

// Perform a subset of the testing until while we resolve the issues with the other tests
sh'''set; make -f fvtest/omrtest.mk -j1 SPEC=zos_390-64 omr_algotest omr_vmtest omr_utiltest omr_sigtest omr_rastest'''
dir('build') {
echo "Sanity Test..."
sh'''./omralgotest -avltest:fvtest/algotest/avltest.lst && ./omrvmtest && ./omrutiltest && ./omrsigtest && ./omrrastest && ./omrsubscribertest && ./omrtraceoptiontest'''
}
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions cmake/config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ set(OMR_TEST_COMPILER OFF CACHE BOOL "Enable building the test compiler")
set(OMR_GC ON CACHE BOOL "Enable the GC")
set(OMR_GC_TEST ${OMR_GC} CACHE BOOL "Enable the GC tests.")

set(OMR_USE_NATIVE_ENCODING ON CACHE BOOL
"Indicates that runtime components should use the systems native encoding (currently only defined for z/OS)"
)
## OMR_COMPILER is required for OMR_JITBUILDER and OMR_TEST_COMPILER
if(NOT OMR_COMPILER)
if(OMR_JITBUILDER)
Expand Down Expand Up @@ -82,6 +85,10 @@ set(OMR_TOOLS_IMPORTFILE "IMPORTFILE-NOTFOUND" CACHE FILEPATH
"Point it to the ImportTools.cmake file of a native build"
)

set(OMR_TOOLS_USE_NATIVE_ENCODING ON CACHE BOOL
"Indicates if omr tooling should use system native character encoding (currently only defined for z/OS)"
)

###
### Library names
###
Expand Down
80 changes: 80 additions & 0 deletions cmake/modules/FindLEX.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
###############################################################################
# Copyright (c) 2019, 2019 IBM Corp. and others
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which accompanies this
# distribution and is available at http://eclipse.org/legal/epl-2.0
# or the Apache License, Version 2.0 which accompanies this distribution
# and is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# This Source Code may also be made available under the following Secondary
# Licenses when the conditions for such availability set forth in the
# Eclipse Public License, v. 2.0 are satisfied: GNU General Public License,
# version 2 with the GNU Classpath Exception [1] and GNU General Public
# License, version 2 with the OpenJDK Assembly Exception [2].
#
# [1] https://www.gnu.org/software/classpath/license.html
# [2] http://openjdk.java.net/legal/assembly-exception.html
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
#############################################################################

find_program(LEX_EXECUTABLE NAMES lex DOC "Path to the lex executable")
mark_as_advanced(LEX_EXECUTABLE)

if(LEX_EXECUTABLE)
macro(LEX_TARGET Name Input Output)
set(LEX_TARGET_outputs "${Output}")
set(LEX_EXECUTABLE_opts "")
set(LEX_TARGET_PARAM_OPTIONS)
set(LEX_TARGET_PARAM_ONE_VALUE_KEYWORDS
COMPILE_FLAGS
)
set(LEX_TARGET_PARAM_MULTI_VALUE_KEYWORDS)

cmake_parse_arguments(
LEX_TARGET_ARG
"${LEX_TARGET_PARAM_OPTIONS}"
"${LEX_TARGET_PARAM_ONE_VALUE_KEYWORDS}"
"${LEX_TARGET_MULTI_VALUE_KEYWORDS}"
${ARGN}
)

set(LEX_TARGET_usage "LEX_TARGET(<Name> <Input> <Output> [COMPILE_FLAGS <string>]")

if(NOT "${LEX_TARGET_ARG_UNPARSED_ARGUMENTS}" STREQUAL "")
message(SEND_ERROR ${LEX_TARGET_usage})
else()
if(NOT "${LEX_TARGET_ARG_COMPILE_FLAGS}" STREQUAL "")
set(LEX_EXECUTABLE_opts "${LEX_TARGET_ARG_COMPILE_FLAGS}")
separate_arguments(LEX_EXECUTABLE_opts)
endif()

add_custom_command(OUTPUT ${LEX_TARGET_outputs}
COMMAND ${LEX_EXECUTABLE} ${LEX_EXECUTABLE_opts} -o${Output} ${Input}
VERBATIM
DEPENDS ${Input}
COMMENT "[LEX][${Name}] Building scanner with LEX ${LEX_VERSION}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

set(LEX_${Name}_DEFINED TRUE)
set(LEX_${Name}_OUTPUTS ${Output})
set(LEX_${Name}_INPUT ${Input})
set(LEX_${Name}_COMPILE_FLAGS ${LEX_EXECUTABLE_opts})
endif()
endmacro()

macro(ADD_LEX_YACC_DEPENDENCY LEXTarget YACCTarget)
if(NOT LEX_${LEXTarget}_OUTPUTS)
message(SEND_ERROR "LEX target `${LEXTarget}' does not exist.")
endif()

if(NOT YACC_${YACCTarget}_OUTPUT_HEADER)
message(SEND_ERROR "YACC target `${YACCTarget}' does not exist.")
endif()

set_source_files_properties(${LEX_${LEXTarget}_OUTPUTS}
PROPERTIES OBJECT_DEPENDS ${YACC_${YACCTarget}_OUTPUT_HEADER})
endmacro()
endif()
93 changes: 93 additions & 0 deletions cmake/modules/FindYACC.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
###############################################################################
# Copyright (c) 2019, 2019 IBM Corp. and others
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which accompanies this
# distribution and is available at http://eclipse.org/legal/epl-2.0
# or the Apache License, Version 2.0 which accompanies this distribution
# and is available at https://www.apache.org/licenses/LICENSE-2.0.
#
# This Source Code may also be made available under the following Secondary
# Licenses when the conditions for such availability set forth in the
# Eclipse Public License, v. 2.0 are satisfied: GNU General Public License,
# version 2 with the GNU Classpath Exception [1] and GNU General Public
# License, version 2 with the OpenJDK Assembly Exception [2].
#
# [1] https://www.gnu.org/software/classpath/license.html
# [2] http://openjdk.java.net/legal/assembly-exception.html
#
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
#############################################################################

find_program(YACC_EXECUTABLE NAMES yacc DOC "Path to the YACC executable")
mark_as_advanced(YACC_EXECUTABLE)

if(YACC_EXECUTABLE)
macro(YACC_TARGET_option_extraopts Options)
set(YACC_TARGET_cmdopt "")
set(YACC_TARGET_extraopts "${Options}")
separate_arguments(YACC_TARGET_extraopts)
list(APPEND YACC_TARGET_cmdopt ${YACC_TARGET_extraopts})
endmacro()

macro(YACC_TARGET_option_defines YACCOutput Header)
if("${Header}" STREQUAL "")
string(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\2" _fileext "${YACCOutput}")
string(REPLACE "c" "h" _fileext ${_fileext})
string(REGEX REPLACE "^(.*)(\\.[^.]*)$" "\\1${_fileext}" YACC_TARGET_output_header "${YACCOutput}")
list(APPEND YACC_TARGET_cmdopt "-d")
else()
set(YACC_TARGET_output_header "${Header}")

if(OMR_HOST_OS STREQUAL "zos")
list(APPEND YACC_TARGET_cmdopt "-D${YACC_TARGET_output_header}")
else()
list(APPEND YACC_TARGET_cmdopt "--defines=${YACC_TARGET_output_header}")
endif()
endif()
endmacro()

macro(YACC_TARGET Name YACCInput YACCOutput)
set(YACC_TARGET_outputs "${YACCOutput}")
set(YACC_TARGET_extraoutputs "")
set(YACC_TARGET_PARAM_OPTIONS)
set(YACC_TARGET_PARAM_ONE_VALUE_KEYWORDS
COMPILE_FLAGS
DEFINES_FILE
)

cmake_parse_arguments(
YACC_TARGET_ARG
"${YACC_TARGET_PARAM_OPTIONS}"
"${YACC_TARGET_PARAM_ONE_VALUE_KEYWORDS}"
"${LEX_TARGET_MULTI_VALUE_KEYWORDS}"
${ARGN}
)

set(YACC_TARGET_usage "YACC_TARGET(<Name> <Input> <Output> [COMPILE_FLAGS <string>] [DEFINES_FILE <string>]")

if(NOT "${YACC_TARGET_ARG_UNPARSED_ARGUMENTS}" STREQUAL "")
message(SEND_ERROR ${YACC_TARGET_usage})
else()
YACC_TARGET_option_extraopts("${YACC_TARGET_ARG_COMPILE_FLAGS}")
YACC_TARGET_option_defines("${YACCOutput}" "${YACC_TARGET_ARG_DEFINES_FILE}")

list(APPEND YACC_TARGET_outputs "${YACC_TARGET_output_header}")

add_custom_command(OUTPUT ${YACC_TARGET_outputs}
COMMAND ${YACC_EXECUTABLE} ${YACC_TARGET_cmdopt} -o ${YACCOutput} ${YACCInput}
VERBATIM
DEPENDS ${YACCInput}
COMMENT "[YACC][${Name}] Building parser with YACC"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)

set(YACC_${Name}_DEFINED TRUE)
set(YACC_${Name}_INPUT ${YACCInput})
set(YACC_${Name}_OUTPUTS ${YACC_TARGET_outputs} ${YACC_TARGET_extraoutputs})
set(YACC_${Name}_COMPILE_FLAGS ${YACC_TARGET_cmdopt})
set(YACC_${Name}_OUTPUT_SOURCE "${YACCOutput}")
set(YACC_${Name}_OUTPUT_HEADER "${YACC_TARGET_output_header}")
endif()
endmacro()
endif()
4 changes: 2 additions & 2 deletions cmake/modules/OmrDetectSystemInformation.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2017, 2018 IBM Corp. and others
# Copyright (c) 2017, 2019 IBM Corp. and others
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -182,7 +182,7 @@ macro(omr_detect_system_information)
# Just use GNU config
set(_OMR_TOOLCONFIG "gnu")
endif()
elseif(CMAKE_C_COMPILER_ID STREQUAL "XL")
elseif(CMAKE_C_COMPILER_ID STREQUAL "XL" OR CMAKE_C_COMPILER_ID STREQUAL "zOS")
set(_OMR_TOOLCONFIG "xlc")
else()
message(FATAL_ERROR "OMR: Unknown compiler ID: '${CMAKE_CXX_COMPILER_ID}'")
Expand Down
6 changes: 1 addition & 5 deletions cmake/modules/platform/arch/s390.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2017, 2018 IBM Corp. and others
# Copyright (c) 2017, 2019 IBM Corp. and others
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which accompanies this
Expand All @@ -19,10 +19,6 @@
# SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
###############################################################################

list(APPEND OMR_PLATFORM_DEFINITIONS
-DJ9VM_TIERED_CODE_CACHE
)

# Testarossa build variables. Longer term the distinction between TR and the rest
# of the OMR code should be heavily reduced. In the mean time, we keep
# the distinction
Expand Down
65 changes: 15 additions & 50 deletions cmake/modules/platform/os/zos.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###############################################################################
# Copyright (c) 2017, 2017 IBM Corp. and others
# Copyright (c) 2017, 2019 IBM Corp. and others
#
# This program and the accompanying materials are made available under
# the terms of the Eclipse Public License 2.0 which accompanies this
Expand All @@ -20,12 +20,15 @@
#############################################################################

list(APPEND OMR_PLATFORM_DEFINITIONS
-DJ9ZOS390
-DLONGLONG
-D_ALL_SOURCE
-D_XOPEN_SOURCE_EXTENDED
-DIBM_ATOE
-D_OPEN_THREADS=2
fjeremic marked this conversation as resolved.
Show resolved Hide resolved
Leonardo2718 marked this conversation as resolved.
Show resolved Hide resolved
-D_POSIX_SOURCE
-D_XOPEN_SOURCE_EXTENDED
-D_ISOC99_SOURCE
-DLONGLONG
-DJ9ZOS390
-DSUPPORTS_THREAD_LOCAL
-DZOS
)

list(APPEND OMR_PLATFORM_INCLUDE_DIRECTORIES
Expand All @@ -34,52 +37,14 @@ list(APPEND OMR_PLATFORM_INCLUDE_DIRECTORIES
/usr/include
)

list(APPEND OMR_PLATFORM_COMPILE_OPTIONS
"\"-Wc,xplink\"" # link with xplink calling convention
"\"-Wc,convlit(ISO8859-1)\"" # convert all string literals to a codepage
"\"-Wc,rostring\"" # place string literals in read only storage
"\"-Wc,FLOAT(IEEE,FOLD,AFP)\"" # Use IEEE (instead of IBM Hex Format) style floats
"\"-Wc,enum(4)\"" # Specifies how many bytes of storage enums occupy
"\"-Wa,goff\"" # Assemble into GOFF object files
"\"-Wc,NOANSIALIAS\"" # Do not generate ALIAS binger control statements
"\"-Wc,TARGET(zOSV1R13)\"" # Generate code for the target operating system
)

list(APPEND OMR_PLATFORM_C_COMPILE_OPTIONS
"\"-Wc,ARCH(7)\""
"\"-Wc,langlvl(extc99)\""
"\"-qnosearch\""
)

list(APPEND OMR_PLATFORM_CXX_COMPILE_OPTIONS
"\"-Wc,ARCH(7)\""
"\"-Wc,langlvl(extended)\""
"\"-qnosearch\""
)

list(APPEND OMR_PLATFORM_SHARED_COMPILE_OPTIONS
"\"-Wc,DLL\""
"\"-Wc,EXPORTALL\""
)

list(APPEND OMR_PLATFORM_SHARED_LINKER_OPTIONS
"\"-Wl,xplink\""
"\"-Wl,dll\""
)
# Create helper targets for specifying ascii/ebcdic options
add_library(omr_ascii INTERFACE)
target_compile_definitions(omr_ascii INTERFACE -DIBM_ATOE)
target_compile_options(omr_ascii INTERFACE "-Wc,convlit(ISO8859-1)")
target_link_libraries(omr_ascii INTERFACE j9a2e)

if(OMR_ENV_DATA64)
list(APPEND OMR_PLATFORM_DEFINITIONS
-DJ9ZOS39064
)
list(APPEND OMR_PLATFORM_COMPILE_OPTIONS
\"-Wc,lp64\"
\"-Wa,SYSPARM(BIT64)\"
)
else()
list(APPEND OMR_PLATFORM_DEFINITIONS
-D_LARGE_FILES
)
endif()
add_library(omr_ebcdic INTERFACE)
target_compile_definitions(omr_ebcdic INTERFACE -DOMR_EBCDIC)

macro(omr_os_global_setup)

Expand Down
Loading