diff options
| author | Marco Vanotti <mvanotti@google.com> | 2019-03-13 13:15:58 -0700 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-03-14 07:30:33 +0100 |
| commit | 4bb30071df212ae1cbb9c5b576736b423c90df4c (patch) | |
| tree | 31bb56d6d6bc5f6a6b1b4f94cbd6b61933de9264 /pkg | |
| parent | d09a902e9d8663c6efcf5ef2ec6e32161d3dea71 (diff) | |
pkg/build: update fuchsia build commands.
This CL splits the fx commands into two: one that runs `fx set` setting
the same arguments as before, and another one right after, running `fx
clean-build` to build fuchsia.
Recently[0], fuchsia made it impossible to run `fx clean-build`
specifying the arguments. Instead, one should run `fx set` before.
The benefit is that `clean-build` now preserves the build arguments
across runs. For syzkaller, it doesn't change anything though.
[0]: https://fuchsia-review.googlesource.com/c/fuchsia/+/262674
Diffstat (limited to 'pkg')
| -rw-r--r-- | pkg/build/fuchsia.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/build/fuchsia.go b/pkg/build/fuchsia.go index 42771343e..491ce496c 100644 --- a/pkg/build/fuchsia.go +++ b/pkg/build/fuchsia.go @@ -21,11 +21,14 @@ func (fu fuchsia) build(targetArch, vmType, kernelDir, outputDir, compiler, user return fmt.Errorf("unsupported fuchsia arch %v", targetArch) } arch := sysTarget.KernelHeaderArch - if _, err := osutil.RunCmd(time.Hour, kernelDir, "scripts/fx", "clean-build", arch, + if _, err := osutil.RunCmd(time.Hour, kernelDir, "scripts/fx", "set", arch, "--args", `extra_authorized_keys_file="//.ssh/authorized_keys"`, "--board", "boards/x64.gni", "--product", "products/core.gni"); err != nil { return err } + if _, err := osutil.RunCmd(time.Hour, kernelDir, "scripts/fx", "clean-build"); err != nil { + return err + } for src, dst := range map[string]string{ "out/" + arch + "/obj/build/images/fvm.blk": "image", ".ssh/pkey": "key", |
