-
Notifications
You must be signed in to change notification settings - Fork 5
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 relative paths for build artifacts and sources #32
Use relative paths for build artifacts and sources #32
Conversation
I still see lots of absolute paths being used when I run the _make script generated:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also cd BUILD_DIR in the generated _make
scripts
purge memory targets, now supported in ORFS directly.
@@ -90,7 +103,7 @@ docker run --name "bazel-orfs-$uuid" --rm \ | |||
bash -c \ | |||
"set -ex | |||
. ./env.sh | |||
cd \$FLOW_HOME | |||
cd \$BUILD_DIR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is missing from the generated _make
scripts, near as I can see
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is because in the local flow we are already placed in the right build directory. In the docker flow it is required strictly because of the container default working directory being /OpenROAD-flow-scripts/
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turns out that with most recent modifications it was actually beneficial to also do that in orfs
@@ -1,7 +1,7 @@ | |||
.PHONY: memory | |||
memory: $(RESULTS_DIR)/mem.json | |||
python3 $(BUILD_DIR)/scripts/mem_dump.py $(RESULTS_DIR)/mem.json | |||
python3 $(MEMORY_DUMP_PY) $(RESULTS_DIR)/mem.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ORFS now supports memory target natively, purge memory target from bazel-orfs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, we can remove those but would that be OK for you if we handle this in a separate follow-up PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
Yes, those are absolute paths but this is the ORFS thing. See: https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/blob/be4b5b5473b4d7c2a54812d5405d043d14b9a057/flow/platforms/asap7/config.mk#L9. When it comes to everything that comes from bazel-orfs: LEFs and other build artifacts, as well as e.g. verilog sources no longer use absolute paths. You can see that in e.g. config files:
|
Here is another way to reproduce problems with absolute paths. OBJECTS_DIR should not contain an absolute path:
Another case where this causes problems, run:
There should be no absolute paths here:
Here is an example of how
|
Oh, I see that now, thanks for pointing out. We will look into this |
This helps, but is not sufficient:
No absolute path:
Still an absolute path:
|
Signed-off-by: Pawel Czarnecki <[email protected]>
Replace with to remove absolute paths in env vars like DESIGN_CONFIG used in script-based and automated flows. The effect of modification is that bash runfiles library is no longer needed so it was removed. Signed-off-by: Pawel Czarnecki <[email protected]>
Signed-off-by: Pawel Czarnecki <[email protected]>
ffeefd2
to
38012a7
Compare
We reworked the flow. Currently there is only one env var with absolute path which is With the following changes we were able to drop the |
This PR reduces the usage of
BUILD_DIR
env var in favor of relative paths to build artifacts and sources.It was required to also change the build directory when using the docker flow from
ORFS
directory to bazel build directory (the same as in local flow) to keep the consistency between the flows in order to use relative paths.This was tested in the following configurations:
bazel-orfs
bazel-orfs
megaboom
megaboom
megaboom
withbazel-orfs
dependency specified throughlocal_path_override
megaboom
withbazel-orfs
dependency specified throughlocal_path_override