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

Pass custom GCC optimization flags #2258

Open
ReperakDev opened this issue Nov 24, 2020 · 4 comments
Open

Pass custom GCC optimization flags #2258

ReperakDev opened this issue Nov 24, 2020 · 4 comments
Labels
installer Issues that relate to our installer jobs or installer repo question Issues that are queries about the code base or potential problems that have been spotted

Comments

@ReperakDev
Copy link

Unsure where to raise something? Here are some of the common places:

  • If your issue is due to the way OpenJDK is built, then this is the repository to raise it in - Describe your problem below
  • If your issue is related to our installers (as opposed to tgz/zip downloads) raise it in openjdk-installer
  • If your issue is related to and end-user visible issue with the JDK, or an underlying java bug, please raise it in openjdk-support
  • Otherwise, take a look at our TSC repository directory here. If you're still not sure then join our [slack channel[(http://adoptopenjdk.net/slack) and ask on #general

Problem description: It doesn't seem like there's a way to pass custom compiler flags (e.g -O3) to the build script.
I've tried using the undocumented --make-args flag however that did not work. I'd like to see an easy and well documented way to enable experimental compiler flags.

@sxa sxa added the question Issues that are queries about the code base or potential problems that have been spotted label Nov 24, 2020
@skjolber
Copy link

@M-Davies @sxa any hope for this? A few recent JDK benchmarks seem to indicate that tweaking the build can improve the performance considerably.

@github-actions github-actions bot added the installer Issues that relate to our installer jobs or installer repo label May 22, 2022
@karianna
Copy link
Contributor

There are some generic optimisations that could be applied, especially for the Aarch64 based architectures. But we have to be careful not to optimize only for some architectures and disadvantage others.

@skjolber What's your use case here?

@skjolber
Copy link

@karianna my use-case is building for local developer machine execution, i.e. not distribution, on an AMD machine. I plan on copying compiler flags from one of the best performing distributions and running my benchmarks, which will at least include maven and gradle build performance.

The top performing distos typically offer docker images, so do not think there is much to gain from making customized images.

@sxa
Copy link
Member

sxa commented May 23, 2022

Which script are you interested in doing this for? For makejdk-any-platform.sh you'd likely be able to use:

--configure-args "--with-extra-cflags=-O3 --with-extra-cxxflags=-O3"

Or if you're running make-adopt-build-farm.sh then setting

CONFIGURE_ARGS="--with-extra-cflags=-O3 --with-extra-cxxflags=-O3"

first should do it.

@ReperakDev @skjolber Let me know whether that works for you. It would be interesting to hear the results of building with any such changes if you're willing and able to share.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installer Issues that relate to our installer jobs or installer repo question Issues that are queries about the code base or potential problems that have been spotted
Projects
Status: Todo
Development

No branches or pull requests

4 participants