Skip to content

Commit

Permalink
docker.BUILD.bazel: openroad.bzl: Fixed out-of-sandbox library access…
Browse files Browse the repository at this point in the history
… path

Signed-off-by: Jan Bylicki <[email protected]>
  • Loading branch information
jbylicki committed Sep 5, 2024
1 parent 4d3f2ad commit c2b0f01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
1 change: 1 addition & 0 deletions docker.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ filegroup(
name = "openroad",
data = [
":ld.so",
":qt_plugins",
],
srcs = ["OpenROAD-flow-scripts/tools/install/OpenROAD/bin/openroad"],
visibility = ["//visibility:public"],
Expand Down
16 changes: 1 addition & 15 deletions openroad.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -243,19 +243,6 @@ def envwrap(command):
"""
return "env -S " + command

def pathatlevel(path, level):
"""
Return `path` argument, `level` directories back.
Args:
path: Path to be prepended.
level: The level of the parent directory to go to.
Returns:
The edited path.
"""
return "/".join([".." for _ in range(level)] + [path])

def flow_substitutions(ctx):
return {
"${MAKE_PATH}": ctx.executable._make.path,
Expand All @@ -273,7 +260,6 @@ def openroad_substitutions(ctx):
"${TCL_LIBRARY}": commonpath(ctx.files._tcl),
"${LIBGL_DRIVERS_PATH}": commonpath(ctx.files._opengl),
"${QT_PLUGIN_PATH}": commonpath(ctx.files._qt_plugins),
"${QT_QPA_PLATFORM_PLUGIN_PATH}": commonpath(ctx.files._qt_plugins),
"${GIO_MODULE_DIR}": commonpath(ctx.files._gio_modules),
}

Expand Down Expand Up @@ -814,7 +800,7 @@ def _make_impl(ctx, stage, steps, result_names = [], object_names = [], log_name
"OPENROAD_EXE": ctx.executable._openroad.path,
"KLAYOUT_CMD": envwrap(preloadwrap(ctx.executable._klayout.path, ctx.file._libstdbuf.path)),
"TCL_LIBRARY": commonpath(ctx.files._tcl),
"QT_QPA_PLATFORM_PLUGIN_PATH": pathatlevel(commonpath(ctx.files._qt_plugins), 5),
"QT_QPA_PLATFORM_PLUGIN_PATH": commonpath(ctx.files._qt_plugins),
"QT_PLUGIN_PATH": commonpath(ctx.files._qt_plugins),
},
inputs = depset(
Expand Down

0 comments on commit c2b0f01

Please sign in to comment.