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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

**/*.xcodeproj/xcuserdata/*
**/*.xcodeproj/project.xcworkspace/xcuserdata/*
**/*.xcodeproj/rules_xcodeproj/.lldbinit
**/*.xcodeproj/rules_xcodeproj/links
**/*.xcodeproj/rules_xcodeproj/toplevel_cache_buster
**/*.xcodeproj/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -eu\n\nif [ \"$ACTION\" == \"indexbuild\" ]; then\n # We use a different output base for Index Build to prevent normal builds and\n # indexing waiting on bazel locks from the other\n output_base=\"$OBJROOT/bazel_output_base\"\nfi\n\noutput_path=$(env -i \\\n DEVELOPER_DIR=\"$DEVELOPER_DIR\" \\\n HOME=\"$HOME\" \\\n PATH=\"${PATH//\\/usr\\/local\\/bin//opt/homebrew/bin:/usr/local/bin}\" \\\n USER=\"$USER\" \\\n \"$BAZEL_PATH\" \\\n ${output_base:+--output_base \"$output_base\"} \\\n info \\\n --experimental_convenience_symlinks=ignore \\\n output_path)\nexternal=\"${output_path%/*/*/*}/external\"\n\n# We only want to modify `$LINKS_DIR` during normal builds since Indexing can\n# run concurrent to normal builds\nif [ \"$ACTION\" != \"indexbuild\" ]; then\n mkdir -p \"$LINKS_DIR\"\n cd \"$LINKS_DIR\"\n\n # Add BUILD and DONT_FOLLOW_SYMLINKS_WHEN_TRAVERSING_THIS_DIRECTORY_VIA_A_RECURSIVE_TARGET_PATTERN\n # files to the internal links directory to prevent Bazel from recursing into\n # it, and thus following the `external` symlink\n touch BUILD\n touch DONT_FOLLOW_SYMLINKS_WHEN_TRAVERSING_THIS_DIRECTORY_VIA_A_RECURSIVE_TARGET_PATTERN\n\n # Need to remove the directories that Xcode creates as part of output prep\n rm -rf external\n rm -rf gen_dir\n\n ln -sf \"$external\" external\n ln -sf \"$BUILD_DIR/bazel-out\" gen_dir\nfi\n\ncd \"$BUILD_DIR\"\n\nrm -rf external\nrm -rf real-bazel-out\n\nln -sf \"$external\" external\nln -sf \"$output_path\" real-bazel-out\nln -sfn \"$PROJECT_DIR\" SRCROOT\n\n# Create parent directories of generated files, so the project navigator works\n# better faster\n\nmkdir -p bazel-out\ncd bazel-out\n\nsed 's|\\/[^\\/]*$||' \\\n \"$INTERNAL_DIR/generated.rsynclist\" \\\n | uniq \\\n | while IFS= read -r dir\ndo\n mkdir -p \"$dir\"\ndone\n\ncd \"$SRCROOT\"\n\ndate +%s > \"$INTERNAL_DIR/toplevel_cache_buster\"\n\nenv -i \\\n DEVELOPER_DIR=\"$DEVELOPER_DIR\" \\\n HOME=\"$HOME\" \\\n PATH=\"${PATH//\\/usr\\/local\\/bin//opt/homebrew/bin:/usr/local/bin}\" \\\n USER=\"$USER\" \\\n \"$BAZEL_PATH\" \\\n ${output_base:+--output_base \"$output_base\"} \\\n build \\\n --experimental_convenience_symlinks=ignore \\\n --output_groups=generated_inputs \\\n //test/fixtures:fixture_bwb\n";
shellScript = "set -eu\n\nif [ \"$ACTION\" == \"indexbuild\" ]; then\n # We use a different output base for Index Build to prevent normal builds and\n # indexing waiting on bazel locks from the other\n output_base=\"$OBJROOT/bazel_output_base\"\nfi\n\noutput_path=$(env -i \\\n DEVELOPER_DIR=\"$DEVELOPER_DIR\" \\\n HOME=\"$HOME\" \\\n PATH=\"${PATH//\\/usr\\/local\\/bin//opt/homebrew/bin:/usr/local/bin}\" \\\n USER=\"$USER\" \\\n \"$BAZEL_PATH\" \\\n ${output_base:+--output_base \"$output_base\"} \\\n info \\\n --experimental_convenience_symlinks=ignore \\\n output_path)\nexternal=\"${output_path%/*/*/*}/external\"\n\nif [[ -f \"$HOME/.lldbinit\" ]]; then\n home_init=\"command source ~/.lldbinit\n\n\"\nelse\n home_init=\"\"\nfi\n\ncat <<EOF > \"$BAZEL_LLDB_INIT\"\n$home_init\\\n# Set \\`CWD\\` to \\`\\$SRCROOT\\` so relative paths in binaries work\nplatform settings -w \"$SRCROOT\"\n\n# \"Undo\" `-debug-prefix-map`\nsettings set target.source-map ./external/ \"$external\"\nsettings append target.source-map ./ \"$SRCROOT\"\nEOF\n\n# We only want to modify `$LINKS_DIR` during normal builds since Indexing can\n# run concurrent to normal builds\nif [ \"$ACTION\" != \"indexbuild\" ]; then\n mkdir -p \"$LINKS_DIR\"\n cd \"$LINKS_DIR\"\n\n # Add BUILD and DONT_FOLLOW_SYMLINKS_WHEN_TRAVERSING_THIS_DIRECTORY_VIA_A_RECURSIVE_TARGET_PATTERN\n # files to the internal links directory to prevent Bazel from recursing into\n # it, and thus following the `external` symlink\n touch BUILD\n touch DONT_FOLLOW_SYMLINKS_WHEN_TRAVERSING_THIS_DIRECTORY_VIA_A_RECURSIVE_TARGET_PATTERN\n\n # Need to remove the directories that Xcode creates as part of output prep\n rm -rf external\n rm -rf gen_dir\n\n ln -sf \"$external\" external\n ln -sf \"$BUILD_DIR/bazel-out\" gen_dir\nfi\n\ncd \"$BUILD_DIR\"\n\nrm -rf external\nrm -rf real-bazel-out\n\nln -sf \"$external\" external\nln -sf \"$output_path\" real-bazel-out\nln -sfn \"$PROJECT_DIR\" SRCROOT\n\n# Create parent directories of generated files, so the project navigator works\n# better faster\n\nmkdir -p bazel-out\ncd bazel-out\n\nsed 's|\\/[^\\/]*$||' \\\n \"$INTERNAL_DIR/generated.rsynclist\" \\\n | uniq \\\n | while IFS= read -r dir\ndo\n mkdir -p \"$dir\"\ndone\n\ncd \"$SRCROOT\"\n\ndate +%s > \"$INTERNAL_DIR/toplevel_cache_buster\"\n\nenv -i \\\n DEVELOPER_DIR=\"$DEVELOPER_DIR\" \\\n HOME=\"$HOME\" \\\n PATH=\"${PATH//\\/usr\\/local\\/bin//opt/homebrew/bin:/usr/local/bin}\" \\\n USER=\"$USER\" \\\n \"$BAZEL_PATH\" \\\n ${output_base:+--output_base \"$output_base\"} \\\n build \\\n --experimental_convenience_symlinks=ignore \\\n --output_groups=generated_inputs \\\n //test/fixtures:fixture_bwb\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -1642,6 +1642,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
BAZEL_EXTERNAL = "$(LINKS_DIR)/external";
BAZEL_LLDB_INIT = "$(INTERNAL_DIR)/.lldbinit";
BAZEL_OUT = "$(BUILD_DIR)/real-bazel-out";
BAZEL_PATH = bazel;
CLANG_ENABLE_OBJC_ARC = YES;
Expand Down
3 changes: 2 additions & 1 deletion test/fixtures/cc/bwb.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -eu\n\nif [ \"$ACTION\" == \"indexbuild\" ]; then\n # We use a different output base for Index Build to prevent normal builds and\n # indexing waiting on bazel locks from the other\n output_base=\"$OBJROOT/bazel_output_base\"\nfi\n\noutput_path=$(env -i \\\n DEVELOPER_DIR=\"$DEVELOPER_DIR\" \\\n HOME=\"$HOME\" \\\n PATH=\"${PATH//\\/usr\\/local\\/bin//opt/homebrew/bin:/usr/local/bin}\" \\\n USER=\"$USER\" \\\n \"$BAZEL_PATH\" \\\n ${output_base:+--output_base \"$output_base\"} \\\n info \\\n --experimental_convenience_symlinks=ignore \\\n output_path)\nexternal=\"${output_path%/*/*/*}/external\"\n\n# We only want to modify `$LINKS_DIR` during normal builds since Indexing can\n# run concurrent to normal builds\nif [ \"$ACTION\" != \"indexbuild\" ]; then\n mkdir -p \"$LINKS_DIR\"\n cd \"$LINKS_DIR\"\n\n # Add BUILD and DONT_FOLLOW_SYMLINKS_WHEN_TRAVERSING_THIS_DIRECTORY_VIA_A_RECURSIVE_TARGET_PATTERN\n # files to the internal links directory to prevent Bazel from recursing into\n # it, and thus following the `external` symlink\n touch BUILD\n touch DONT_FOLLOW_SYMLINKS_WHEN_TRAVERSING_THIS_DIRECTORY_VIA_A_RECURSIVE_TARGET_PATTERN\n\n # Need to remove the directories that Xcode creates as part of output prep\n rm -rf external\n rm -rf gen_dir\n\n ln -sf \"$external\" external\n ln -sf \"$BUILD_DIR/bazel-out\" gen_dir\nfi\n\ncd \"$BUILD_DIR\"\n\nrm -rf external\nrm -rf real-bazel-out\n\nln -sf \"$external\" external\nln -sf \"$output_path\" real-bazel-out\nln -sfn \"$PROJECT_DIR\" SRCROOT\n\ncd \"$SRCROOT\"\n\nenv -i \\\n DEVELOPER_DIR=\"$DEVELOPER_DIR\" \\\n HOME=\"$HOME\" \\\n PATH=\"${PATH//\\/usr\\/local\\/bin//opt/homebrew/bin:/usr/local/bin}\" \\\n USER=\"$USER\" \\\n \"$BAZEL_PATH\" \\\n ${output_base:+--output_base \"$output_base\"} \\\n build \\\n --nobuild \\\n --experimental_convenience_symlinks=ignore \\\n //test/fixtures/cc:xcodeproj_bwb\n";
shellScript = "set -eu\n\nif [ \"$ACTION\" == \"indexbuild\" ]; then\n # We use a different output base for Index Build to prevent normal builds and\n # indexing waiting on bazel locks from the other\n output_base=\"$OBJROOT/bazel_output_base\"\nfi\n\noutput_path=$(env -i \\\n DEVELOPER_DIR=\"$DEVELOPER_DIR\" \\\n HOME=\"$HOME\" \\\n PATH=\"${PATH//\\/usr\\/local\\/bin//opt/homebrew/bin:/usr/local/bin}\" \\\n USER=\"$USER\" \\\n \"$BAZEL_PATH\" \\\n ${output_base:+--output_base \"$output_base\"} \\\n info \\\n --experimental_convenience_symlinks=ignore \\\n output_path)\nexternal=\"${output_path%/*/*/*}/external\"\n\nif [[ -f \"$HOME/.lldbinit\" ]]; then\n home_init=\"command source ~/.lldbinit\n\n\"\nelse\n home_init=\"\"\nfi\n\ncat <<EOF > \"$BAZEL_LLDB_INIT\"\n$home_init\\\n# Set \\`CWD\\` to \\`\\$SRCROOT\\` so relative paths in binaries work\nplatform settings -w \"$SRCROOT\"\n\n# \"Undo\" `-debug-prefix-map`\nsettings set target.source-map ./external/ \"$external\"\nsettings append target.source-map ./ \"$SRCROOT\"\nEOF\n\n# We only want to modify `$LINKS_DIR` during normal builds since Indexing can\n# run concurrent to normal builds\nif [ \"$ACTION\" != \"indexbuild\" ]; then\n mkdir -p \"$LINKS_DIR\"\n cd \"$LINKS_DIR\"\n\n # Add BUILD and DONT_FOLLOW_SYMLINKS_WHEN_TRAVERSING_THIS_DIRECTORY_VIA_A_RECURSIVE_TARGET_PATTERN\n # files to the internal links directory to prevent Bazel from recursing into\n # it, and thus following the `external` symlink\n touch BUILD\n touch DONT_FOLLOW_SYMLINKS_WHEN_TRAVERSING_THIS_DIRECTORY_VIA_A_RECURSIVE_TARGET_PATTERN\n\n # Need to remove the directories that Xcode creates as part of output prep\n rm -rf external\n rm -rf gen_dir\n\n ln -sf \"$external\" external\n ln -sf \"$BUILD_DIR/bazel-out\" gen_dir\nfi\n\ncd \"$BUILD_DIR\"\n\nrm -rf external\nrm -rf real-bazel-out\n\nln -sf \"$external\" external\nln -sf \"$output_path\" real-bazel-out\nln -sfn \"$PROJECT_DIR\" SRCROOT\n\ncd \"$SRCROOT\"\n\nenv -i \\\n DEVELOPER_DIR=\"$DEVELOPER_DIR\" \\\n HOME=\"$HOME\" \\\n PATH=\"${PATH//\\/usr\\/local\\/bin//opt/homebrew/bin:/usr/local/bin}\" \\\n USER=\"$USER\" \\\n \"$BAZEL_PATH\" \\\n ${output_base:+--output_base \"$output_base\"} \\\n build \\\n --nobuild \\\n --experimental_convenience_symlinks=ignore \\\n //test/fixtures/cc:xcodeproj_bwb\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -703,6 +703,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
BAZEL_EXTERNAL = "$(LINKS_DIR)/external";
BAZEL_LLDB_INIT = "$(INTERNAL_DIR)/.lldbinit";
BAZEL_OUT = "$(BUILD_DIR)/real-bazel-out";
BAZEL_PATH = bazel;
CLANG_ENABLE_OBJC_ARC = YES;
Expand Down
3 changes: 2 additions & 1 deletion test/fixtures/command_line/bwb.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "set -eu\n\nif [ \"$ACTION\" == \"indexbuild\" ]; then\n # We use a different output base for Index Build to prevent normal builds and\n # indexing waiting on bazel locks from the other\n output_base=\"$OBJROOT/bazel_output_base\"\nfi\n\noutput_path=$(env -i \\\n DEVELOPER_DIR=\"$DEVELOPER_DIR\" \\\n HOME=\"$HOME\" \\\n PATH=\"${PATH//\\/usr\\/local\\/bin//opt/homebrew/bin:/usr/local/bin}\" \\\n USER=\"$USER\" \\\n \"$BAZEL_PATH\" \\\n ${output_base:+--output_base \"$output_base\"} \\\n info \\\n --experimental_convenience_symlinks=ignore \\\n output_path)\nexternal=\"${output_path%/*/*/*}/external\"\n\n# We only want to modify `$LINKS_DIR` during normal builds since Indexing can\n# run concurrent to normal builds\nif [ \"$ACTION\" != \"indexbuild\" ]; then\n mkdir -p \"$LINKS_DIR\"\n cd \"$LINKS_DIR\"\n\n # Add BUILD and DONT_FOLLOW_SYMLINKS_WHEN_TRAVERSING_THIS_DIRECTORY_VIA_A_RECURSIVE_TARGET_PATTERN\n # files to the internal links directory to prevent Bazel from recursing into\n # it, and thus following the `external` symlink\n touch BUILD\n touch DONT_FOLLOW_SYMLINKS_WHEN_TRAVERSING_THIS_DIRECTORY_VIA_A_RECURSIVE_TARGET_PATTERN\n\n # Need to remove the directories that Xcode creates as part of output prep\n rm -rf external\n rm -rf gen_dir\n\n ln -sf \"$external\" external\n ln -sf \"$BUILD_DIR/bazel-out\" gen_dir\nfi\n\ncd \"$BUILD_DIR\"\n\nrm -rf external\nrm -rf real-bazel-out\n\nln -sf \"$external\" external\nln -sf \"$output_path\" real-bazel-out\nln -sfn \"$PROJECT_DIR\" SRCROOT\n\n# Create parent directories of generated files, so the project navigator works\n# better faster\n\nmkdir -p bazel-out\ncd bazel-out\n\nsed 's|\\/[^\\/]*$||' \\\n \"$INTERNAL_DIR/generated.rsynclist\" \\\n | uniq \\\n | while IFS= read -r dir\ndo\n mkdir -p \"$dir\"\ndone\n\ncd \"$SRCROOT\"\n\ndate +%s > \"$INTERNAL_DIR/toplevel_cache_buster\"\n\nenv -i \\\n DEVELOPER_DIR=\"$DEVELOPER_DIR\" \\\n HOME=\"$HOME\" \\\n PATH=\"${PATH//\\/usr\\/local\\/bin//opt/homebrew/bin:/usr/local/bin}\" \\\n USER=\"$USER\" \\\n \"$BAZEL_PATH\" \\\n ${output_base:+--output_base \"$output_base\"} \\\n build \\\n --experimental_convenience_symlinks=ignore \\\n --output_groups=generated_inputs \\\n //test/fixtures/command_line:xcodeproj_bwb\n";
shellScript = "set -eu\n\nif [ \"$ACTION\" == \"indexbuild\" ]; then\n # We use a different output base for Index Build to prevent normal builds and\n # indexing waiting on bazel locks from the other\n output_base=\"$OBJROOT/bazel_output_base\"\nfi\n\noutput_path=$(env -i \\\n DEVELOPER_DIR=\"$DEVELOPER_DIR\" \\\n HOME=\"$HOME\" \\\n PATH=\"${PATH//\\/usr\\/local\\/bin//opt/homebrew/bin:/usr/local/bin}\" \\\n USER=\"$USER\" \\\n \"$BAZEL_PATH\" \\\n ${output_base:+--output_base \"$output_base\"} \\\n info \\\n --experimental_convenience_symlinks=ignore \\\n output_path)\nexternal=\"${output_path%/*/*/*}/external\"\n\nif [[ -f \"$HOME/.lldbinit\" ]]; then\n home_init=\"command source ~/.lldbinit\n\n\"\nelse\n home_init=\"\"\nfi\n\ncat <<EOF > \"$BAZEL_LLDB_INIT\"\n$home_init\\\n# Set \\`CWD\\` to \\`\\$SRCROOT\\` so relative paths in binaries work\nplatform settings -w \"$SRCROOT\"\n\n# \"Undo\" `-debug-prefix-map`\nsettings set target.source-map ./external/ \"$external\"\nsettings append target.source-map ./ \"$SRCROOT\"\nEOF\n\n# We only want to modify `$LINKS_DIR` during normal builds since Indexing can\n# run concurrent to normal builds\nif [ \"$ACTION\" != \"indexbuild\" ]; then\n mkdir -p \"$LINKS_DIR\"\n cd \"$LINKS_DIR\"\n\n # Add BUILD and DONT_FOLLOW_SYMLINKS_WHEN_TRAVERSING_THIS_DIRECTORY_VIA_A_RECURSIVE_TARGET_PATTERN\n # files to the internal links directory to prevent Bazel from recursing into\n # it, and thus following the `external` symlink\n touch BUILD\n touch DONT_FOLLOW_SYMLINKS_WHEN_TRAVERSING_THIS_DIRECTORY_VIA_A_RECURSIVE_TARGET_PATTERN\n\n # Need to remove the directories that Xcode creates as part of output prep\n rm -rf external\n rm -rf gen_dir\n\n ln -sf \"$external\" external\n ln -sf \"$BUILD_DIR/bazel-out\" gen_dir\nfi\n\ncd \"$BUILD_DIR\"\n\nrm -rf external\nrm -rf real-bazel-out\n\nln -sf \"$external\" external\nln -sf \"$output_path\" real-bazel-out\nln -sfn \"$PROJECT_DIR\" SRCROOT\n\n# Create parent directories of generated files, so the project navigator works\n# better faster\n\nmkdir -p bazel-out\ncd bazel-out\n\nsed 's|\\/[^\\/]*$||' \\\n \"$INTERNAL_DIR/generated.rsynclist\" \\\n | uniq \\\n | while IFS= read -r dir\ndo\n mkdir -p \"$dir\"\ndone\n\ncd \"$SRCROOT\"\n\ndate +%s > \"$INTERNAL_DIR/toplevel_cache_buster\"\n\nenv -i \\\n DEVELOPER_DIR=\"$DEVELOPER_DIR\" \\\n HOME=\"$HOME\" \\\n PATH=\"${PATH//\\/usr\\/local\\/bin//opt/homebrew/bin:/usr/local/bin}\" \\\n USER=\"$USER\" \\\n \"$BAZEL_PATH\" \\\n ${output_base:+--output_base \"$output_base\"} \\\n build \\\n --experimental_convenience_symlinks=ignore \\\n --output_groups=generated_inputs \\\n //test/fixtures/command_line:xcodeproj_bwb\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -958,6 +958,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
BAZEL_EXTERNAL = "$(LINKS_DIR)/external";
BAZEL_LLDB_INIT = "$(INTERNAL_DIR)/.lldbinit";
BAZEL_OUT = "$(BUILD_DIR)/real-bazel-out";
BAZEL_PATH = bazel;
CLANG_ENABLE_OBJC_ARC = YES;
Expand Down
Loading