Skip to content

Commit f25d3a2

Browse files
committed
Bug fix for output exec path
The template was missing expand_if_available which by default sets output execution path. The variable can be set over different toolchain so we always need to check if the variable is set regardless if our actions need it or not.
1 parent 6d9e766 commit f25d3a2

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

templates/linux/cc_toolchain_config.bzl.template

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,10 @@ def _impl(ctx):
613613
flag_set(
614614
actions = [ACTION_NAMES.cpp_link_static_library],
615615
flag_groups = [
616-
flag_group(flags = ["rcsD", "%{output_execpath}"]),
616+
flag_group(
617+
flags = ["rcsD", "%{output_execpath}"],
618+
expand_if_available = "output_execpath",
619+
),
617620
flag_group(
618621
iterate_over = "libraries_to_link",
619622
flag_groups = [

templates/qnx/cc_toolchain_config.bzl.template

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,10 @@ def _impl(ctx):
304304
flag_set(
305305
actions = [ACTION_NAMES.cpp_link_static_library],
306306
flag_groups = [
307-
flag_group(flags = ["rcsD", "%{output_execpath}"]),
307+
flag_group(
308+
flags = ["rcsD", "%{output_execpath}"],
309+
expand_if_available = "output_execpath",
310+
),
308311
flag_group(
309312
iterate_over = "libraries_to_link",
310313
flag_groups = [

0 commit comments

Comments
 (0)