Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 7 additions & 0 deletions xcodeproj/internal/execution_root.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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(
Expand Down