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

Use unique temp directory for config finder #1381

Merged
merged 1 commit into from
Mar 7, 2023
Merged

Conversation

abejgonzalez
Copy link
Contributor

@abejgonzalez abejgonzalez commented Mar 7, 2023

This adds a private make variable to the config finder target that specifies a unique location to store the temporary file needed.

Related PRs / Issues:

Type of change:

  • Bug fix
  • New feature
  • Other enhancement

Impact:

  • RTL change
  • Software change (RISC-V software)
  • Build system change
  • Other

Contributor Checklist:

  • Did you set main as the base branch?
  • Is this PR's title suitable for inclusion in the changelog and have you added a changelog:<topic> label?
  • Did you state the type-of-change/impact?
  • Did you delete any extraneous prints/debugging code?
  • Did you mark the PR with a changelog: label?
  • (If applicable) Did you update the conda .conda-lock.yml file if you updated the conda requirements file?
  • (If applicable) Did you add documentation for the feature?
  • (If applicable) Did you add a test demonstrating the PR?
  • (If applicable) Did you mark the PR as Please Backport?

@abejgonzalez abejgonzalez changed the title Use temp directory for config finder Use unique temp directory for config finder Mar 7, 2023
Copy link
Contributor

@jerryz123 jerryz123 left a comment

Choose a reason for hiding this comment

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

Thanks,

@abejgonzalez abejgonzalez merged commit a1afdb4 into main Mar 7, 2023
@tymcauley
Copy link
Contributor

Sorry to comment after this is already merged, but should we use a similar strategy for the /tmp usage in common.mk? See here:

chipyard/common.mk

Lines 199 to 201 in a1afdb4

@if [ $(SFC_LEVEL) = low ]; then cat $(SFC_ANNO_FILE) | jq 'del(.[] | select(.target | test("io.cpu"))?)' > /tmp/unnec-anno-deleted.sfc.anno.json; fi
@if [ $(SFC_LEVEL) = low ]; then cat /tmp/unnec-anno-deleted.sfc.anno.json | jq 'del(.[] | select(.class | test("SRAMAnnotation"))?)' > /tmp/unnec-anno-deleted2.sfc.anno.json; fi
@if [ $(SFC_LEVEL) = low ]; then cat /tmp/unnec-anno-deleted2.sfc.anno.json > $(SFC_ANNO_FILE) && rm /tmp/unnec-anno-deleted.sfc.anno.json && rm /tmp/unnec-anno-deleted2.sfc.anno.json; fi

@jerryz123
Copy link
Contributor

Sorry to comment after this is already merged, but should we use a similar strategy for the /tmp usage in common.mk? See here:

I didn't realize there was another part in the flow that was creating stuff in /tmp. I think that needs to be changed as well to avoid conflicts in multi-user environments.

joonho3020 pushed a commit that referenced this pull request Mar 8, 2023
@abejgonzalez abejgonzalez deleted the patch-cfg-finder branch April 20, 2023 20:37
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.

3 participants