Skip to content

Commit

Permalink
docker_shell: Create out script if it is not present
Browse files Browse the repository at this point in the history
Signed-off-by: Eryk Szpotanski <eszpotanski@antmicro.com>
  • Loading branch information
eszpotanski committed Jul 1, 2024
1 parent ddda733 commit 4aa4ad5
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docker_shell
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,19 @@ export FLOW_HOME="/OpenROAD-flow-scripts/flow/"
# Take first symlink from the workspace, follow it and fetch the directory name
export WORKSPACE_ORIGIN=$(dirname $(find $WORKSPACE_EXECROOT -maxdepth 1 -type l -exec realpath {} \; -quit))

# Create out script if one does not exist
if [[ ! -f $WORKSPACE_EXECROOT/bazel-out/k8-fastbuild/bin/out ]]; then
if [[ -d $WORKSPACE_EXTERNAL/bazel-orfs~override ]]; then
cp $WORKSPACE_EXTERNAL/bazel-orfs~override/out_script $WORKSPACE_EXECROOT/bazel-out/k8-fastbuild/bin/out
elif [[ -f $WORKSPACE_ORIGIN/out_script ]]; then
cp $WORKSPACE_ORIGIN/out_script $WORKSPACE_EXECROOT/bazel-out/k8-fastbuild/bin/out
fi
fi
# Create bazel-bin symlink if it does not exist
if [[ ! -L $WORKSPACE_ORIGIN/bazel-bin ]]; then
ln -s $WORKSPACE_EXECROOT/bazel-out/k8-fastbuild/bin $WORKSPACE_ORIGIN/bazel-bin
fi

# Assume that when docker flow is called from external repository,
# the path to dependencies from bazel-orfs workspace will start with "external".
# Take that into account and construct correct absolute paths.
Expand Down

0 comments on commit 4aa4ad5

Please sign in to comment.