Skip to content

Commit

Permalink
Rename main (non-redirector) shared library: jvm -> j9jvm
Browse files Browse the repository at this point in the history
Signed-off-by: Keith W. Campbell <keithc@ca.ibm.com>
  • Loading branch information
keithc-ca committed Dec 9, 2019
1 parent 4b5a2d4 commit dda65ca
Show file tree
Hide file tree
Showing 16 changed files with 140 additions and 149 deletions.
2 changes: 1 addition & 1 deletion runtime/compiler/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-excepti
</dependency>
<dependency name="j9stackmap"/>
<dependency name="j9vm"/>
<dependency name="jvm"/>
<dependency name="j9jvm"/>
<dependency name="j9shrcommon"/>
<dependency name="j9shrutil"/>
<dependency name="j9shr"/>
Expand Down
40 changes: 19 additions & 21 deletions runtime/hyvm/module.xml
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>

<!--
Copyright (c) 2007, 2018 IBM Corp. and others
Copyright (c) 2007, 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 https://www.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 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 https://www.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].
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
[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
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
-->

<module xmlns:xi="http://www.w3.org/2001/XInclude">
<exports group="all">
<export name="JNI_CreateJavaVM" />
Expand Down Expand Up @@ -55,9 +53,9 @@
<makefilestub data="UMA_DISABLE_DDRGEN=1"/>
</makefilestubs>
<vpaths>
<vpath path="jvm" pattern="%.c" augmentIncludes="true"/>
<vpath path="jvm" pattern="%.asm"/>
<vpath path="jvm" pattern="%.s"/>
<vpath path="j9jvm" pattern="%.c" augmentIncludes="true"/>
<vpath path="j9jvm" pattern="%.asm"/>
<vpath path="j9jvm" pattern="%.s"/>
</vpaths>
<objects>
<object name="jvm"/>
Expand All @@ -79,7 +77,7 @@
<library name="j9vmi"/>
<library name="hyprt"/>
<library name="hyprtshim"/>
<!-- for advance toolchain pthread must be last in the link order -->
<!-- for advance toolchain pthread must be last in the link order -->
<library name="pthread" type="system">
<include-if condition="spec.linux.* and not spec.linux_ztpf.*"/>
</library>
Expand Down
12 changes: 6 additions & 6 deletions runtime/j9vm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,28 +64,28 @@ target_link_libraries(jvm_common
target_include_directories(jvm_common
INTERFACE
${CMAKE_CURRENT_BINARY_DIR}
#TODO we have to repeat ../include because of duplication of vmi.h
# TODO we have to repeat ../include because of duplication of vmi.h
../include
../hyvm
../harmony/include
../jcl/
)

add_library(jvm SHARED ${CMAKE_CURRENT_BINARY_DIR}/ut_j9scar.c)
target_link_libraries(jvm
add_library(j9jvm SHARED ${CMAKE_CURRENT_BINARY_DIR}/ut_j9scar.c)
target_link_libraries(j9jvm
PRIVATE
jvm_common
j9util
)

if(OMR_OS_WINDOWS)
target_link_libraries(jvm PRIVATE ws2_32)
target_link_libraries(j9jvm PRIVATE ws2_32)
endif()
add_dependencies(jvm omrgc_hookgen)
add_dependencies(j9jvm omrgc_hookgen)
include(exports.cmake)

install(
TARGETS jvm
TARGETS j9jvm
LIBRARY DESTINATION ${j9vm_SOURCE_DIR}
RUNTIME DESTINATION ${j9vm_SOURCE_DIR}
)
25 changes: 12 additions & 13 deletions runtime/j9vm/exports.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
# 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
################################################################################

# Wrapper areround omr_add_exports which strips windows name mangling (except on 32bit windows)
# Wrapper areround omr_add_exports which strips windows name mangling (except on 32-bit windows).
function(jvm_add_exports tgt)
set(filtered_exports)
if(OMR_OS_WINDOWS AND OMR_ENV_DATA32)
# we keep mangled names on 32 bit windows
# we keep mangled names on 32-bit windows
set(filtered_exports ${ARGN})
else()
# for each symbol name of the form '_foo@1234' replace with 'foo'
Expand All @@ -36,7 +36,7 @@ function(jvm_add_exports tgt)
omr_add_exports(${tgt} ${filtered_exports})
endfunction()

jvm_add_exports(jvm
jvm_add_exports(j9jvm
JNI_CreateJavaVM
JNI_GetCreatedJavaVMs
JNI_GetDefaultJavaVMInitArgs
Expand Down Expand Up @@ -149,7 +149,7 @@ jvm_add_exports(jvm
jio_vsnprintf
post_block
pre_block
# Additions for Java 7
# Additions for Java 7.
_JVM_GetStackAccessControlContext@8
_JVM_GetInheritedAccessControlContext@8
_JVM_GetArrayLength@8
Expand Down Expand Up @@ -243,16 +243,16 @@ jvm_add_exports(jvm
_JVM_SetPrimitiveField@24
_JVM_SetNativeThreadName@12

# Additions used on linux-x86
# Additions used on linux-x86.
_JVM_SetSockOpt@20
_JVM_SocketShutdown@8
_JVM_GetSockName@12
_JVM_GetHostName@8

# Additions to support the JDWP agent
# Additions to support the JDWP agent.
JVM_InitAgentProperties

# Additions to support Java 7 verification
# Additions to support Java 7 verification.
_JVM_GetMethodIxLocalsCount@12
_JVM_GetCPMethodNameUTF@12
_JVM_GetMethodIxExceptionTableEntry@20
Expand Down Expand Up @@ -284,7 +284,7 @@ jvm_add_exports(jvm
_JVM_GetMethodIxExceptionsCount@12
_JVM_ReleaseUTF@4

# Additions for Java 8
# Additions for Java 8.
_JVM_GetClassTypeAnnotations@8
_JVM_GetFieldTypeAnnotations@8
_JVM_GetMethodParameters@8
Expand All @@ -295,10 +295,9 @@ jvm_add_exports(jvm
)

if(JAVA_SPEC_VERSION LESS 11)
# i.e. JAVA_SPEC_VERSION < 11
jvm_add_exports(jvm _JVM_GetCallerClass@4)
jvm_add_exports(j9jvm _JVM_GetCallerClass@4)
else()
jvm_add_exports(jvm
jvm_add_exports(j9jvm
_JVM_GetCallerClass@8
# Additions for Java 9 (Modularity)
JVM_DefineModule
Expand Down Expand Up @@ -345,8 +344,8 @@ else()
endif()

if(NOT JAVA_SPEC_VERSION LESS 14)
jvm_add_exports(jvm
# Additions for Java 14 (General)
jvm_add_exports(j9jvm
# Additions for Java 14 (General).
JVM_GetExtendedNPEMessage
)
endif()
11 changes: 5 additions & 6 deletions runtime/j9vm/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-excepti
</commands>
</artifact>

<artifact type="shared" name="jvm" bundle="jvm" loadgroup="" appendrelease="false">
<artifact type="shared" name="j9jvm" bundle="jvm" loadgroup="" appendrelease="false">
<include-if condition="spec.flags.module_j9vm" />
<options>
<option name="requiresPrimitiveTable"/>
Expand Down Expand Up @@ -107,10 +107,9 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-excepti
</objects>

<!--
WARNING: DO NOT LINK SHARED LIBRARIES AGAINST THIS SHARED LIBRARY
WE NEED TO BE ABLE TO LOAD IT WITHOUT ANYTHING ELSE ON THE
LIBPATH.
This is required because of sidecar configurations.
WARNING: DO NOT LINK SHARED LIBRARIES AGAINST THIS SHARED LIBRARY
WE NEED TO BE ABLE TO LOAD IT WITHOUT ANYTHING ELSE ON THE LIBPATH.
This is required because of sidecar configurations.
-->
<libraries>
<library name="socket" type="macro"/>
Expand All @@ -121,7 +120,7 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-excepti
<library name="j9hashtable" type="external"/>
<library name="j9pool" type="external"/>
<library name="j9vmi"/>
<!-- for advance toolchain pthread must be last in the link order -->
<!-- for advance toolchain pthread must be last in the link order -->
<library name="pthread" type="system">
<include-if condition="spec.linux.* and not spec.linux_ztpf.*"/>
</library>
Expand Down
2 changes: 1 addition & 1 deletion runtime/jcl/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-excepti
<include path="j9gcinclude"/>
<include path="$(OMR_DIR)/gc/include" type="relativepath"/>
<include path="j9gcgluejava"/>
<include path="jvm"/>
<include path="j9jvm"/>
<include path="j9shr_include"/>
</includes>

Expand Down
4 changes: 2 additions & 2 deletions runtime/redirector/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ set_target_properties(jvm_redirect PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
)

# The redirector should have the same exports as the jvm
get_target_property(jvm_exports jvm EXPORTED_SYMBOLS)
# The redirector should have the same exports as j9jvm.
get_target_property(jvm_exports j9jvm EXPORTED_SYMBOLS)
omr_add_exports(jvm_redirect ${jvm_exports})

install(
Expand Down
2 changes: 1 addition & 1 deletion runtime/redirector/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-excepti
<includes>
<include path="j9include"/>
<include path="j9oti"/>
<include path="jvm"/>
<include path="j9jvm"/>
<include path="$(OMRPORT_SRCDIR)zos390" type="relativepath">
<include-if condition="spec.zos_390.*"/>
</include>
Expand Down
Loading

0 comments on commit dda65ca

Please sign in to comment.