Skip to content

Commit

Permalink
bazel: include iOS config with release (#563)
Browse files Browse the repository at this point in the history
Include the `ios` config by default when using `release-ios`. Also updates the docs for clarity on usage.

Signed-off-by: Michael Rebello <[email protected]>
Signed-off-by: JP Simard <[email protected]>
  • Loading branch information
rebello95 authored and jpsim committed Nov 28, 2022
1 parent ad7b359 commit 0e82df6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions mobile/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ build:release-common \

build:release-ios \
--apple_bitcode=embedded \
--config=ios \
--config=release-common \
--copt=-fembed-bitcode

Expand Down
17 changes: 10 additions & 7 deletions mobile/docs/root/start/building/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Android AAR
Envoy Mobile can be compiled into an ``.aar`` file for use with Android apps.
This command is defined in the main :repo:`BUILD <BUILD>` file of the repo, and may be run locally:

``./bazelw build android_dist --config=android --config=release-android # omit release for development``
``./bazelw build android_dist --config=android``

Upon completion of the build, you'll see an ``envoy.aar`` file at :repo:`dist/envoy.aar <dist>`.

Expand All @@ -60,8 +60,10 @@ Alternatively, you can use the prebuilt artifact from Envoy Mobile's releases_.
The ``envoy_mobile_android`` Bazel rule defined in the :repo:`dist BUILD file <dist/BUILD>` provides
an example of how this artifact may be used.

When building the artifact for release (usage outside of development), be sure to include the
``--config=release-android`` option.
**When building the artifact for release** (usage outside of development), be sure to include the
``--config=release-android`` option, along with the architectures for which the artifact is being built:

``./bazelw build android_dist --config=release-android --fat_apk_cpu=x86,x86_64,armeabi-v7a,arm64-v8a``

For a demo of a working app using this artifact, see the :ref:`hello_world` example.

Expand All @@ -74,7 +76,7 @@ iOS static framework
Envoy Mobile supports being compiled into a ``.framework`` for consumption by iOS apps.
This command is defined in the main :repo:`BUILD <BUILD>` file of the repo, and may be run locally:

``./bazelw build ios_dist --config=ios --config=release-ios # omit release for development``
``./bazelw build ios_dist --config=ios``

Upon completion of the build, you'll see a ``Envoy.framework`` directory at
:repo:`dist/Envoy.framework <dist>`.
Expand All @@ -84,9 +86,10 @@ Alternatively, you can use the prebuilt artifact from Envoy Mobile's releases_.
The ``envoy_mobile_ios`` Bazel rule defined in the :repo:`dist BUILD file <dist/BUILD>` provides an
example of how this artifact may be used.

When building the artifact for release (usage outside of development), be sure to include the
``--config=release-ios`` option in addition to ``--config=ios`` and a list of architectures for which
you wish to build using ``--ios_multi_cpus=...``.
**When building the artifact for release** (usage outside of development), be sure to include the
``--config=release-ios`` option, along with the architectures for which the artifact is being built:

``./bazelw build ios_dist --config=release-ios --ios_multi_cpus=i386,x86_64,armv7,arm64``

For a demo of a working app using this artifact, see the :ref:`hello_world` example.

Expand Down

0 comments on commit 0e82df6

Please sign in to comment.