From b8bb882895120c1ba31fac7b79326b36ec3d923d Mon Sep 17 00:00:00 2001 From: Googler Date: Sun, 8 Sep 2024 22:14:21 -0700 Subject: [PATCH] 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 --- cc/toolchains/args/runtime_library_search_directories/BUILD | 4 ++-- .../goldens/unix/runtime_library_search_directories.textproto | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 @@ cc_nested_args( "-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 @@ cc_nested_args( "-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 @@ flag_sets { 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 @@ flag_sets { 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" } }