[sdk][bazel] Package up the proper version of prebuilt SDK libraries.

This change improves the packaging strategy for C++ binaries by defining explicit mappings for SDK libraries.

Test: added test for packaging non-SDK libraries, verified contents of resulting package
Bug: DX-312 #done
Change-Id: If619f9a82e40d4f5e4f99ce9d108fef849fdc444
11 files changed
tree: 6c71a3e447f95232deed17f08daa93c4f0d64d0e
  1. crash/
  2. dart/
  3. devshell/
  4. editors/
  5. gce/
  6. gdb/
  7. grubdisk/
  8. manifest/
  9. memory/
  10. packages/
  11. rust/
  12. sdk/
  13. style/
  14. third_party/
  15. vbox/
  16. vim/
  17. youcompleteme/
  18. zsh-completion/
  19. .gitignore
  20. AUTHORS
  21. bootstrap
  22. build-qemu.sh
  23. build-zircon.sh
  24. check-gn-format
  25. colorize_logs
  26. CONTRIBUTING.md
  27. fd.py
  28. flog
  29. fx
  30. fx-env.sh
  31. fx-wrapper
  32. generate-intellij-config.py
  33. generate-update-source-config.py
  34. git-file-format
  35. git-file-tidy
  36. git-fuchsia-review
  37. git_utils.py
  38. gn_to_cmake.py
  39. LICENSE
  40. MAINTAINERS
  41. PATENTS
  42. paths.py
  43. pave-prebuilt
  44. publish-package.py
  45. push-package.py
  46. README.md
  47. run-dart-action.py
  48. run-zircon-arm64
  49. run-zircon-x86
  50. start-dhcp-server.sh
  51. update-manifest.go
README.md

Scripts

This repository is for scripts useful when hacking on Fuchsia. This repository should contain scripts that perform tasks spanning multiple repositories. Scripts that only operate within a single repository should live in the relevant repository.

push-package.py

The push-package.py script pushes the files listed in the given manifests files. No checking is performed for incremental changes.

The sample command lines below can be used to build Modular and then push those files to the default device. This assumes you have already booted your device with a version of Fuchsia that contains the most recent version of all other packages. This command line uses the “system_manifest” file from each of the modular directories, such as modular, modular_dev, and modular_tests.

cd $FUCHSIA_DIR
fx build peridot:modular_all
scripts/push-package.py out/debug-x64/package/modular*/system_manifest

fx publish

fx publish will take a package from the build and create a Fuchsia package manager package from a build package. It will then add the package to a local update respository which, by default, is put at ${FUCHSIA_BUILD_DIR}/amber-files. It will also add the package content files to the update repository and name these file after their Merkle Root. If a package name is supplied to fx publish, only that package will be processed. If no name is supplied, all the packages made by the build will be included.