Skip to content

Commit

Permalink
Add J9VM_OPT_JITSERVER to j9cfg.h.in for cmake build system
Browse files Browse the repository at this point in the history
Instead of adding -DJ9VM_OPT_JITSERVER, add it to j9cfg.h.in
so that cmake system can convert it to define or undef depending
on the env variable with same name.

Signed-off-by: Ashutosh Mehra <mehra.ashutosh@ibm.com>
  • Loading branch information
Ashutosh Mehra committed Feb 27, 2020
1 parent b9c1fd8 commit c5f120f
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 5 deletions.
3 changes: 0 additions & 3 deletions runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ include(cmake/omr_config.cmake)
if(OPENJ9_BUILD)
add_definitions(-DOPENJ9_BUILD)
endif()
if (J9VM_OPT_JITSERVER)
add_definitions(-DJ9VM_OPT_JITSERVER)
endif()

# clean up the variables we used
set(versionStr)
Expand Down
1 change: 1 addition & 0 deletions runtime/cmake/caches/common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ set(J9VM_OPT_DYNAMIC_LOAD_SUPPORT ON CACHE BOOL "")
set(J9VM_OPT_FRAGMENT_RAM_CLASSES ON CACHE BOOL "")
set(J9VM_OPT_INLINE_JSRS ON CACHE BOOL "")
set(J9VM_OPT_INVARIANT_INTERNING ON CACHE BOOL "")
set(J9VM_OPT_JITSERVER OFF CACHE BOOL "Enable JITServer")
set(J9VM_OPT_JVMTI ON CACHE BOOL "")
set(J9VM_OPT_JXE_LOAD_SUPPORT ON CACHE BOOL "")
set(J9VM_OPT_MEMORY_CHECK_SUPPORT ON CACHE BOOL "")
Expand Down
1 change: 0 additions & 1 deletion runtime/compiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ add_custom_target(j9jit_tracegen DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/env/ut_j9ji
# J9VM_OPT_JITSERVER and protobuf
if(J9VM_OPT_JITSERVER)
message(STATUS "JITServer is supported")
add_definitions(-DJ9VM_OPT_JITSERVER)

include(FindProtobuf)
set(Protobuf_USE_STATIC_LIBS ON)
Expand Down
2 changes: 1 addition & 1 deletion runtime/compiler/runtime/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ j9jit_files(

if(J9VM_OPT_JITSERVER)
j9jit_files(
runtime/CompileService.cpp
runtime/CompileService.cpp
runtime/JITClientSession.cpp
runtime/JITServerIProfiler.cpp
runtime/JITServerStatisticsThread.cpp
Expand Down
1 change: 1 addition & 0 deletions runtime/include/j9cfg.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ extern "C" {
#cmakedefine J9VM_OPT_INLINE_JSRS
#cmakedefine J9VM_OPT_INVARIANT_INTERNING
#cmakedefine J9VM_OPT_JAVA_OFFLOAD_SUPPORT
#cmakedefine J9VM_OPT_JITSERVER
#cmakedefine J9VM_OPT_JVMTI
#cmakedefine J9VM_OPT_JXE_LOAD_SUPPORT
#cmakedefine J9VM_OPT_MEMORY_CHECK_SUPPORT
Expand Down

0 comments on commit c5f120f

Please sign in to comment.