Skip to content

Commit

Permalink
Fix grpc-swift source files generation in OSS release builds
Browse files Browse the repository at this point in the history
Summary:
There was an issue that broke the release build compilation of the OSS xcodeproject.
Default way to create a build rule in Xcode leads to flag that configures multiple build step invocations. That confuses Xcode build system, because we produce the same files regardless of the architecture we call that step against
We do not need multiple calls for each architecture for that build rule, we need to run that command only once

Differential Revision: D38535115

fbshipit-source-id: d137c3df2a53f9c09328c218a55765f97c5b1f8f
  • Loading branch information
Nikita Patskov authored and facebook-github-bot committed Aug 9, 2022
1 parent f638fbb commit facd511
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions idb_companion.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@
"$(DERIVED_FILE_DIR)/$(INPUT_FILE_BASE).pb.swift",
"$(DERIVED_FILE_DIR)/$(INPUT_FILE_BASE).grpc.swift",
);
runOncePerArchitecture = 0;
script = "# Generate grpc code from .proto\nPATH=$PATH:/opt/homebrew/bin/:/usr/local/bin:$HOME/homebrew/bin/\n\nGRPC_PACKAGE_DIR=${BUILD_DIR%Build/*}SourcePackages/checkouts/grpc-swift\n\nprotoc \\\n --proto_path=$INPUT_FILE_DIR \\\n --swift_out=$DERIVED_FILE_DIR \\\n --grpc-swift_out=$DERIVED_FILE_DIR \\\n --grpc-swift_opt=Visibility=Public \\\n --swift_opt=Visibility=Public \\\n --plugin=protoc-gen-grpc-swift=$GRPC_PACKAGE_DIR/.build/release/protoc-gen-grpc-swift \\\n --plugin=protoc-gen-swift=$GRPC_PACKAGE_DIR/.build/release/protoc-gen-swift \\\n $INPUT_FILE_PATH\n";
};
/* End PBXBuildRule section */
Expand Down

0 comments on commit facd511

Please sign in to comment.