Skip to content

Add --disable-jfe configure flag to make JFE optional#46

Merged
laijx03 merged 1 commit intoopen64-compiler:developfrom
noafroboy:feature/optional-jfe
Mar 3, 2026
Merged

Add --disable-jfe configure flag to make JFE optional#46
laijx03 merged 1 commit intoopen64-compiler:developfrom
noafroboy:feature/optional-jfe

Conversation

@noafroboy
Copy link
Contributor

Summary

  • Add --disable-jfe configure flag following the existing --disable-fortran pattern
  • Gate JFE/js2mpl in GNU4_FE_COMPONENTS and clean targets behind ifeq ($(BUILD_JFE), YES)
  • Wrap JFE dependency checks (gradle, java, cmake, JAVA_HOME) so they only run when JFE is enabled

Motivation

The Java Frontend requires gradle, openjdk-8, cmake, and a correctly configured JAVA_HOME. Currently, configure exits with an error if any of these are missing, blocking the entire compiler build even for users who only need C/C++ support.

This change makes JFE opt-out while preserving full backward compatibility: without --disable-jfe, the existing checks still run and JFE is built as before.

Changes

  • configure.ac: AC_ARG_ENABLE([jfe]), AC_SUBST([BUILD_JFE]), guard JFE checks
  • configure: Mirror configure.ac changes in the pre-generated script
  • Makefile.in: BUILD_JFE = @BUILD_JFE@, conditional jfe/js2mpl build and clean targets

Test plan

  • ./configure --disable-jfe — skips JFE checks, builds without jfe/js2mpl
  • ./configure (no flag) — existing behavior, JFE checks run, jfe/js2mpl built
  • make clean with and without JFE — only cleans jfe/js2mpl dirs when enabled

🤖 Generated with Claude Code

The Java Frontend (JFE) and js2mpl require gradle, openjdk-8, cmake,
and a correctly set JAVA_HOME — dependencies that many build
environments do not have. Currently, configure exits with an error
if any of these are missing, blocking the entire build.

Add a --disable-jfe flag (following the existing --disable-fortran
pattern) that skips JFE dependency checks and excludes jfe/js2mpl
from the build. Default behavior is unchanged: JFE is still built
unless --disable-jfe is passed.

Changes:
- configure.ac: Add AC_ARG_ENABLE([jfe]) and AC_SUBST([BUILD_JFE]),
  wrap JFE checks in an enable_jfe guard
- configure: Mirror the configure.ac changes in the generated script
- Makefile.in: Add BUILD_JFE variable, gate jfe/js2mpl in
  GNU4_FE_COMPONENTS and clean targets behind ifeq ($(BUILD_JFE), YES)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@laijx03 laijx03 merged commit eb22f2d into open64-compiler:develop Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants