Skip to content

Commit dd4e552

Browse files
committed
Use a different --output_base for Index Build
1 parent 84c89f1 commit dd4e552

File tree

12 files changed

+76
-36
lines changed

12 files changed

+76
-36
lines changed

examples/ios_app/test/fixtures/bwb.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@
10141014
);
10151015
runOnlyForDeploymentPostprocessing = 0;
10161016
shellPath = /bin/sh;
1017-
shellScript = "set -eu\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 info \\\n output_path)\nexternal=\"${output_path%/*/*/*}/external\"\n\nmkdir -p \"$LINKS_DIR\"\ncd \"$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 it,\n# and thus following the `external` symlink\ntouch BUILD\ntouch 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\nrm -rf gen_dir\nrm -rf external\n\nln -sf \"$external\" external\nln -sf \"$BUILD_DIR/bazel-out\" gen_dir\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";
1017+
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\ntouch BUILD\ntouch 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 gen_dir\n rm -rf external\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";
10181018
showEnvVarsInLog = 0;
10191019
};
10201020
C1BCE66C756D6574AE7961FF /* Fix Info.plists */ = {
@@ -1075,7 +1075,7 @@
10751075
);
10761076
runOnlyForDeploymentPostprocessing = 0;
10771077
shellPath = /bin/sh;
1078-
shellScript = "set -eu\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 build \\\n --output_groups=generated_inputs \\\n //test/fixtures:fixture_bwb\n";
1078+
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\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";
10791079
showEnvVarsInLog = 0;
10801080
};
10811081
/* End PBXShellScriptBuildPhase section */

examples/ios_app/test/fixtures/bwx.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@
997997
);
998998
runOnlyForDeploymentPostprocessing = 0;
999999
shellPath = /bin/sh;
1000-
shellScript = "set -eu\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 build \\\n --output_groups=generated_inputs \\\n //test/fixtures:fixture_bwx\n";
1000+
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\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_bwx\n";
10011001
showEnvVarsInLog = 0;
10021002
};
10031003
588A3D0F8C7F3BC89386E0B0 /* Copy Files */ = {
@@ -1054,7 +1054,7 @@
10541054
);
10551055
runOnlyForDeploymentPostprocessing = 0;
10561056
shellPath = /bin/sh;
1057-
shellScript = "set -eu\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 info \\\n output_path)\nexternal=\"${output_path%/*/*/*}/external\"\n\nmkdir -p \"$LINKS_DIR\"\ncd \"$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 it,\n# and thus following the `external` symlink\ntouch BUILD\ntouch 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\nrm -rf gen_dir\nrm -rf external\n\nln -sf \"$external\" external\nln -sf \"$BUILD_DIR/bazel-out\" gen_dir\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";
1057+
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\ntouch BUILD\ntouch 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 gen_dir\n rm -rf external\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";
10581058
showEnvVarsInLog = 0;
10591059
};
10601060
B3A06EEB8CFD571AB8F5BFAB /* Fix Modulemaps */ = {

test/fixtures/cc/bwb.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@
356356
);
357357
runOnlyForDeploymentPostprocessing = 0;
358358
shellPath = /bin/sh;
359-
shellScript = "set -eu\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 info \\\n output_path)\nexternal=\"${output_path%/*/*/*}/external\"\n\nmkdir -p \"$LINKS_DIR\"\ncd \"$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 it,\n# and thus following the `external` symlink\ntouch BUILD\ntouch 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\nrm -rf gen_dir\nrm -rf external\n\nln -sf \"$external\" external\nln -sf \"$BUILD_DIR/bazel-out\" gen_dir\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";
359+
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\ntouch BUILD\ntouch 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 gen_dir\n rm -rf external\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";
360360
showEnvVarsInLog = 0;
361361
};
362362
/* End PBXShellScriptBuildPhase section */

test/fixtures/cc/bwx.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@
356356
);
357357
runOnlyForDeploymentPostprocessing = 0;
358358
shellPath = /bin/sh;
359-
shellScript = "set -eu\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 info \\\n output_path)\nexternal=\"${output_path%/*/*/*}/external\"\n\nmkdir -p \"$LINKS_DIR\"\ncd \"$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 it,\n# and thus following the `external` symlink\ntouch BUILD\ntouch 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\nrm -rf gen_dir\nrm -rf external\n\nln -sf \"$external\" external\nln -sf \"$BUILD_DIR/bazel-out\" gen_dir\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";
359+
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\ntouch BUILD\ntouch 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 gen_dir\n rm -rf external\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";
360360
showEnvVarsInLog = 0;
361361
};
362362
/* End PBXShellScriptBuildPhase section */

test/fixtures/command_line/bwb.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@
504504
);
505505
runOnlyForDeploymentPostprocessing = 0;
506506
shellPath = /bin/sh;
507-
shellScript = "set -eu\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 info \\\n output_path)\nexternal=\"${output_path%/*/*/*}/external\"\n\nmkdir -p \"$LINKS_DIR\"\ncd \"$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 it,\n# and thus following the `external` symlink\ntouch BUILD\ntouch 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\nrm -rf gen_dir\nrm -rf external\n\nln -sf \"$external\" external\nln -sf \"$BUILD_DIR/bazel-out\" gen_dir\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";
507+
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\ntouch BUILD\ntouch 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 gen_dir\n rm -rf external\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";
508508
showEnvVarsInLog = 0;
509509
};
510510
7D1C1AFB1B1C40174C24CF23 /* Copy Swift Generated Header */ = {
@@ -582,7 +582,7 @@
582582
);
583583
runOnlyForDeploymentPostprocessing = 0;
584584
shellPath = /bin/sh;
585-
shellScript = "set -eu\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 build \\\n --output_groups=generated_inputs \\\n //test/fixtures/command_line:xcodeproj_bwb\n";
585+
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\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";
586586
showEnvVarsInLog = 0;
587587
};
588588
/* End PBXShellScriptBuildPhase section */

0 commit comments

Comments
 (0)