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

Add a DOWNLOAD_GMP option to build against a local GMP build #731

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

arichardson
Copy link
Collaborator

This downloads the latest release of GMP and builds it as part of the overall emulator build. This should make it easier to build sail without having to install system dependencies.

See #215

@arichardson
Copy link
Collaborator Author

If we decide to use this I can add one for libz. However that dependency will go away soon and is commonly available so not sure if it's worthwhile

Copy link

github-actions bot commented Feb 12, 2025

Test Results

392 tests  ±0   392 ✅ ±0   1m 20s ⏱️ ±0s
  1 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit 08c2ae6. ± Comparison against base commit dd7d438.

♻️ This comment has been updated with latest results.

@jordancarlin
Copy link
Collaborator

If we decide to use this I can add one for libz. However that dependency will go away soon and is commonly available so not sure if it's worthwhile

I don't think it is worthwhile to add for zlib since (as you mentioned) it will be gone starting with the next Sail release. More worthwhile perhaps would be to have it automatically download the Sail compiler itself. That way there would be next to no dependences other than a compiler and cmake.

CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Collaborator

@Timmmm Timmmm left a comment

Choose a reason for hiding this comment

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

This is great! We should probably mention it in the README. Maybe use it in build_emulators.sh?

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
@arichardson arichardson force-pushed the gmp-build-from-source branch from 20a95b2 to 61d8c5d Compare February 14, 2025 18:51
@arichardson
Copy link
Collaborator Author

New version should address all comments raised so far.

This downloads the latest release of GMP and builds it as part of the
overall emulator build. This should make it easier to build sail without
having to install system dependencies.

Also change build_simulators.sh to download GMP by default to make it
easier for users that don't manually configure the CMake build.

See riscv#215
Now that we default to building libgmp, it makes more sense to increase
job count to number of available CPUs since there is more parallelism.
@arichardson arichardson force-pushed the gmp-build-from-source branch from 61d8c5d to 08c2ae6 Compare February 14, 2025 18:53
Copy link
Collaborator

@Timmmm Timmmm left a comment

Choose a reason for hiding this comment

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

LGTM. Do we want to add a CI matrix entry that uses this option so it doesn't get broken in future?

@arichardson
Copy link
Collaborator Author

LGTM. Do we want to add a CI matrix entry that uses this option so it doesn't get broken in future?

Yes that would be good - let me do that as a follow-up?

Copy link
Collaborator

@jordancarlin jordancarlin left a comment

Choose a reason for hiding this comment

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

LGTM now. Agreed that we should test this in CI. Maybe just by running the build_emulators.sh script.

@jordancarlin jordancarlin added the will be merged Scheduled to be merged in a few days if nobody objects label Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
will be merged Scheduled to be merged in a few days if nobody objects
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants