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

Proposal: Separate build and target architecture in the build scripts #3648

Open
adamfarley opened this issue Feb 13, 2024 · 0 comments
Open
Labels
enhancement Issues that enhance the code or documentation of the repo in any way macos Issues that affect or relate to the MAC OS

Comments

@adamfarley
Copy link
Contributor

adamfarley commented Feb 13, 2024

Summary

To separate the concepts of build (verb) and target architectures in the build scripts.

Value

This change will:

  • Ensure the SBOM always uses the correct architecture for cross-compiled builds.
  • Ensure the static libs folder always has the correct name for cross-compiled builds.
  • Create a more robust build framework for cross-compilation.

Glossary

"Build architecture" - The architecture of the machine we're building a JDK binary on.

"Target architecture" - The architecture of the machine we're building a JDK binary for.

Details

In this issue for Mac x64, we discovered that the target architecture is, in many ways, conflated with the build architecture.

We added a temporary work-around for the issue here, but in the long run we need to be considering these architectures separately in order to provide a robust framework for generating cross-compiled builds.

A good place to start is this line of code. We should make sure this variable is suitably renamed (build_arch), and is never accidentally used for the target architecture. The target architecture should be set by the job parameter, which should also be renamed (e.g. TARGET_ARCH) for clarity.

Useful information.

@adamfarley adamfarley added the enhancement Issues that enhance the code or documentation of the repo in any way label Feb 13, 2024
@github-actions github-actions bot added the macos Issues that affect or relate to the MAC OS label Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues that enhance the code or documentation of the repo in any way macos Issues that affect or relate to the MAC OS
Projects
Status: No status
Status: Todo
Development

No branches or pull requests

1 participant