Support a local Fuchsia platform tree as SDK source
if an env variable named "LOCAL_FUCHSIA_PLATFORM_BUILD" is defined and
points to Fuchsia Platform build output directory, the SDK (including
the experimental SDK, if use_experimental is true) will be directly
copied from the Fuchsia Platform build output dir.
The Fuchsia tree needs to be built with 'fx build sdk'
or 'fx build sdk sdk:ddk' if the experimental SDK is needed.
A developer using this workflow will need to issue the following command
in order to refresh the SDK:
bazel sync --configure
For example,
```
export LOCAL_FUCHSIA_PLATFORM_BUILD=$HOME/fuchsia/out/core.x64
# in OOT repository
bazel sync --configure
bazel build --config=fuchsia_x64 src:samples_repository
# in Fuchsia platform source:
# change something
fx build sdk sdk:ddk
# in OOT repository
bazel sync --configure
bazel build --config=fuchsia_x64 src:samples_repository
```
Note that a few things will look different, with possible side effects:
- the SDK version (ffx sdk version) will be an empty string
- the product bundles (ie emulator images) will require an explict gs://
URL, since SDK version is used by default and it is empty for a local
SDK.
- anything else that depends on the SDK version may not work as
expected.
Change-Id: I1f806c59cd23c1fe7addb9036ab0775d10b41166
Reviewed-on: https://fuchsia-review.googlesource.com/c/sdk-integration/+/670846
Fuchsia-Auto-Submit: Renato Mangini Dias <mangini@google.com>
Reviewed-by: Chase Latta <chaselatta@google.com>
Commit-Queue: Renato Mangini Dias <mangini@google.com>
1 file changed