diff --git a/CHANGELOG.md b/CHANGELOG.md index 7e36d2d54..2dfdffe91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -56,7 +56,7 @@ END_UNRELEASED_TEMPLATE ### Fixed -* TBD +* Fixed incompatible output base causing startup options change: [#3229](https://github.com/MobileNativeFoundation/rules_xcodeproj/pull/3229) ### Ruleset Development Changes diff --git a/xcodeproj/internal/execution_root.bzl b/xcodeproj/internal/execution_root.bzl index bb7851325..a29824032 100644 --- a/xcodeproj/internal/execution_root.bzl +++ b/xcodeproj/internal/execution_root.bzl @@ -4,6 +4,10 @@ def write_execution_root_file(*, actions, bin_dir_path, name): """Creates a `File` containing the absolute path to the Bazel execution \ root. + If the execution root is under `/private/`, this prefix is stripped so that + we don't end up with a different path than what Xcode uses (since we also + remove this prefix for Xcode). + Args: actions: `ctx.actions`. bin_dir_path: `ctx.bin_dir.path`. @@ -19,6 +23,9 @@ def write_execution_root_file(*, actions, bin_dir_path, name): command = """\ bin_dir_full="$(perl -MCwd -e 'print Cwd::abs_path shift' "{bin_dir}";)" execution_root="${{bin_dir_full%/{bin_dir}}}" +if [[ $execution_root == /private/* ]]; then + execution_root="${{execution_root#/private}}" +fi echo "$execution_root" > "{output}" """.format(