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

CMake: Fix assembly flags when compiling the jit #2478

Merged
merged 1 commit into from
Apr 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions cmake/modules/OmrCompilerSupport.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ macro(set_tr_compile_options)
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} PARENT_SCOPE)
# message("[set_tr_compile_options] Set CMAKE_CXX_FLAGS to ${CMAKE_CXX_FLAGS}")
# message("[set_tr_compile_options] Set CMAKE_C_FLAGS to ${CMAKE_C_FLAGS}")
set(CMAKE_ASM_FLAGS ${TR_ASM_FLAGS} PARENT_SCOPE)
endmacro(set_tr_compile_options)

# Create an OMR Compiler component
Expand Down
7 changes: 5 additions & 2 deletions cmake/modules/platform/arch/x86.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,13 @@ if(OMR_ENV_DATA64)

set(TR_HOST_SUBARCH amd64)
set(TR_HOST_BITS 64)
set(CMAKE_ASM-ATT_FLAGS "--64 --defsym TR_HOST_X86=1 --defsym TR_HOST_64BIT=1 --defsym BITVECTOR_64BIT=1 --defsym LINUX=1 --defsym TR_TARGET_X86=1 --defsym TR_TARGET_64BIT=1")
#TODO the asm flags only work for GNU right now.
if(CMAKE_ASM_COMPILER_ID STREQUAL "GNU")
set(TR_ASM_FLAGS "-Wa,--64,--defsym,TR_HOST_X86=1,--defsym,TR_HOST_64BIT=1,--defsym,BITVECTOR_64BIT=1,--defsym,LINUX=1,--defsym,TR_TARGET_X86=1,--defsym,TR_TARGET_64BIT=1")
endif()
else()
list(APPEND TR_COMPILE_DEFINITIONS -DTR_HOST_32BIT -DTR_TARGET_32BIT)

set(TR_HOST_SUBARCH i386)
set(TR_HOST_BITS 32)
endif()