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

Better Building of FIRRTL From Source #1563

Merged
merged 3 commits into from
Sep 4, 2020
Merged

Conversation

jackkoenig
Copy link
Contributor

@jackkoenig jackkoenig commented Aug 22, 2020

This allows you to build FIRRTL from source in a much cleaner way. In this repo you can do so in the following way:

# From root of this repo
git clone [email protected]:freechipsproject/firrtl.git
sbt -Dsbt.sourcemode=true -Dsbt.workspace=$PWD

This will use the source checkout of firrtl, having SBT manage both (much better for use with IDEs and other tooling). You can commit those -D arguments in .sbtopts and SBT will pick it up automatically.

There is a companion rocket-chip PR to come.

TODO

  • Write doc for this new behavior

Contributor Checklist

  • [NA] Did you add Scaladoc to every public function/method?
  • Did you add at least one test demonstrating the PR?
  • Did you delete any extraneous printlns/debugging code?
  • Did you specify the type of improvement?
  • Did you add appropriate documentation in docs/src?
  • Did you state the API impact?
  • Did you specify the code generation impact?
  • Did you request a desired merge strategy?
  • Did you add text to be included in the Release Notes for this change?

Type of Improvement

  • new feature/API (in the build at least)

API Impact

This breaks the firrtl.jar unmanaged dependency technique for building chisel3 with firrtl from source. This new API works a lot better

Backend Code Generation Impact

No impact

Desired Merge Strategy

    • Squash

Release Notes

Improve chisel3 support for building against firrtl from source

Reviewer Checklist (only modified by reviewer)

  • Did you add the appropriate labels?
  • Did you mark the proper milestone (3.2.x, 3.3.x, 3.4.0, 3.5.0) ?
  • Did you review?
  • Did you check whether all relevant Contributor checkboxes have been checked?
  • Did you mark as Please Merge?

@jackkoenig jackkoenig added this to the 3.4.0 milestone Aug 22, 2020
@jackkoenig jackkoenig requested a review from a team as a code owner August 22, 2020 01:34
@jackkoenig jackkoenig requested review from seldridge and removed request for a team August 22, 2020 01:34
Copy link
Member

@seldridge seldridge left a comment

Choose a reason for hiding this comment

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

lgtm

Consider adding docs documentation that this exists. I'm leaving the option of doing this and the merging to you, @jackkoenig.

Using JVM SystemProperties sbt.sourcemode and sbt.workspace, one can now
easily build chisel3 with firrtl and treadle from source.

Example use:

Assuming firrtl and treadle are cloned into the chisel3 root directory:
$ sbt -Dsbt.sourcemode=true -Dsbt.workspace=$PWD

Alternatively, one can set these properties in .sbtopts which can then
be committed, enabling building from source by default
Having it optionally as a source dependency means that SBT projects
building chisel3 from source need treadle as a source dependency despite
it not being required by the main configuration
@jackkoenig
Copy link
Contributor Author

@seldridge I added some documentation, I intend to merge this once it passes

@jackkoenig jackkoenig merged commit 05ac57c into master Sep 4, 2020
@jackkoenig jackkoenig deleted the sriracha-source-deps branch September 4, 2020 19:39
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