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

Define JAVA_SPEC_VERSION only in j9cfg.h #2459

Merged
merged 2 commits into from
Jul 25, 2018

Conversation

keithc-ca
Copy link
Contributor

Enhance UMA to accept -M options to allow definitions of new macros.
Use that new option in buildtools.mk.
Adjust j9cfg.h.ftl to define JAVA_SPEC_VERSION accordingly.
A similar change to j9cfg.h.in was needed for cmake usage.
Remove all definitions of JAVA_SPEC_VERSION on command lines.

ifdef VERSION_MAJOR
EXTRA_CMAKE_ARGS += -DJ9VM_JAVA_VERSION=$(VERSION_MAJOR)
ifneq (,$(VERSION_MAJOR))
EXTRA_CMAKE_ARGS += -DJAVA_SPEC_VERSION=$(VERSION_MAJOR)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't seem right to stop defining J9VM_JAVA_VERSION for cmake, at least without fixing all the references. Its used in platform.cmake and version.cmake

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems my search for for J9VM_JAVA_VERSION was incomplete: I'll fix those references.

@@ -41,6 +41,8 @@ extern "C" {

#define EsExtraVersionString ""

#define JAVA_SPEC_VERSION <#if uma.spec.properties.JAVA_SPEC_VERSION.defined>${uma.spec.properties.JAVA_SPEC_VERSION.value}<#else>8</#if>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be an error if uma.spec.properties.JAVA_SPEC_VERSION is not defined, rather than defaulting to 8?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes an error would be better: I'll fix that.

@keithc-ca
Copy link
Contributor Author

Updated with requested changes.

@pshipton
Copy link
Member

@dnakamura any concerns with these changes?

@@ -43,7 +42,7 @@ target_include_directories(jvm_redirect
"${j9vm_SOURCE_DIR}/j9vm"
"${j9vm_BINARY_DIR}/j9vm"
)
target_compile_definitions(jvm_redirect PRIVATE J9VM_JAVA_VERSION=148)
target_compile_definitions(jvm_redirect PRIVATE J9VM_JAVA9_BUILD=148)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are the changes in this file to change from J9VM_JAVA_VERSION to J9VM_JAVA9_BUILD a bug fix, not directly related to the other changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an unrelated bug fix. The redirector code cares about J9VM_JAVA9_BUILD.

@pshipton
Copy link
Member

jenkins test sanity win

@pshipton
Copy link
Member

fyi the jdk8 build failure

* don't define JAVA_SPEC_VERSION on any compile command line

CMake
* redirector code depends on J9VM_JAVA9_BUILD, not J9VM_JAVA_VERSION

j9cfg.h.in
* fix J9VM_VERSION_MINOR
* remove temporary #undefs (EsVersionMajor and EsVersionMinor
  are not defined elsewhere)

Signed-off-by: Keith W. Campbell <[email protected]>
@pshipton
Copy link
Member

jenkins test sanity win

@pshipton
Copy link
Member

JDK8 - win_x86-64_cmprssptrs failure is the known NPT_ERROR

@pshipton pshipton merged commit 620b0aa into eclipse-openj9:master Jul 25, 2018
@keithc-ca keithc-ca deleted the uma-version branch July 25, 2018 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants