Fix rule-based implementation of runtime_library_search_directories
BEGIN_PUBLIC
Fix rule-based implementation of runtime_library_search_directories
As runtime_library_search_directories was written and reorganized through review, some instances of `$ORIGIN` were unintentionally renamed to `$EXEC_ORIGIN`. This change fixes those instances to correctly mirror CppActionConfigs.java.
END_PUBLIC
BUG: 349427627
PiperOrigin-RevId: 672401255
Change-Id: Ic20f9e77eccca8bc7e7f895aeaeb44f85022df28
diff --git a/cc/toolchains/args/runtime_library_search_directories/BUILD b/cc/toolchains/args/runtime_library_search_directories/BUILD
index a6bc392..2b980bc 100644
--- a/cc/toolchains/args/runtime_library_search_directories/BUILD
+++ b/cc/toolchains/args/runtime_library_search_directories/BUILD
@@ -77,7 +77,7 @@
"-Xlinker",
] + select({
"@platforms//os:macos": ["@loader_path/{search_path}"],
- "//conditions:default": ["$EXEC_ORIGIN/{search_path}"],
+ "//conditions:default": ["$ORIGIN/{search_path}"],
}),
format = {
"search_path": "//cc/toolchains/variables:runtime_library_search_directories",
@@ -113,7 +113,7 @@
"-Xlinker",
] + select({
"@platforms//os:macos": ["@loader_path/{search_path}"],
- "//conditions:default": ["$EXEC_ORIGIN/{search_path}"],
+ "//conditions:default": ["$ORIGIN/{search_path}"],
}),
format = {
"search_path": "//cc/toolchains/variables:runtime_library_search_directories",
diff --git a/tests/rule_based_toolchain/legacy_features_as_args/goldens/unix/runtime_library_search_directories.textproto b/tests/rule_based_toolchain/legacy_features_as_args/goldens/unix/runtime_library_search_directories.textproto
index 1c69c14..8618b47 100644
--- a/tests/rule_based_toolchain/legacy_features_as_args/goldens/unix/runtime_library_search_directories.textproto
+++ b/tests/rule_based_toolchain/legacy_features_as_args/goldens/unix/runtime_library_search_directories.textproto
@@ -21,7 +21,7 @@
flags: "-Xlinker"
flags: "-rpath"
flags: "-Xlinker"
- flags: "$EXEC_ORIGIN/%{runtime_library_search_directories}"
+ flags: "$ORIGIN/%{runtime_library_search_directories}"
}
iterate_over: "runtime_library_search_directories"
}
@@ -43,7 +43,7 @@
flags: "-Xlinker"
flags: "-rpath"
flags: "-Xlinker"
- flags: "$EXEC_ORIGIN/%{runtime_library_search_directories}"
+ flags: "$ORIGIN/%{runtime_library_search_directories}"
iterate_over: "runtime_library_search_directories"
}
}