[makesdk] Overlay artifacts from different arch's SDK manifests
This runs create_layout.py on all (2) architectures we support and
overlays the builds past the first so that we pick up all
architecture-dependent artifacts in the layout. Concretely, this adds
libasync.default.so for both x64 and arm64.
Change-Id: I67c88cd9faed8764f3ad9cd0ee64493ef240a67e
diff --git a/makesdk.go b/makesdk.go
index eb35ac9..878d011 100755
--- a/makesdk.go
+++ b/makesdk.go
@@ -271,18 +271,23 @@
}
func createLayout(manifest, fuchsiaRoot, outDir string) {
- manifestPath := filepath.Join(fuchsiaRoot, x64BuildDir, "sdk-manifests", manifest)
- cmd := filepath.Join(fuchsiaRoot, "scripts", "sdk", "create_layout.py")
- args := []string{"--manifest", manifestPath, "--output", outDir}
- if *verbose || *dryRun {
- fmt.Println("createLayout", cmd, args)
- }
- if *dryRun {
- return
- }
- out, err := exec.Command(cmd, args...).Output()
- if err != nil {
- log.Fatal("create_layout.py failed with output", string(out), "error", err)
+ for idx, buildDir := range []string{x64BuildDir, armBuildDir} {
+ manifestPath := filepath.Join(fuchsiaRoot, buildDir, "sdk-manifests", manifest)
+ cmd := filepath.Join(fuchsiaRoot, "scripts", "sdk", "create_layout.py")
+ args := []string{"--manifest", manifestPath, "--output", outDir}
+ if idx > 0 {
+ args = append(args, "--overlay")
+ }
+ if *verbose || *dryRun {
+ fmt.Println("createLayout", cmd, args)
+ }
+ if *dryRun {
+ return
+ }
+ out, err := exec.Command(cmd, args...).Output()
+ if err != nil {
+ log.Fatal("create_layout.py failed with output", string(out), "error", err)
+ }
}
}