tree: 229fdce04399e9433d1c653e900895c61049233b [path history] [tgz]
  1. testdata/
  2. bisect_flag.go
  3. bisect_flag_test.go
  4. build.py
  5. bundle.py
  6. bundle.README
  7. ccache_flag.go
  8. ccache_flag_test.go
  9. clang_flags.go
  10. clang_flags_test.go
  11. clang_syntax_flag.go
  12. clang_syntax_flag_test.go
  13. clang_tidy_flag.go
  14. clang_tidy_flag_test.go
  15. command.go
  16. compiler_wrapper.go
  17. compiler_wrapper_test.go
  18. config.go
  19. config_test.go
  20. cros_hardened_config_test.go
  21. cros_host_config_test.go
  22. cros_nonhardened_config_test.go
  23. disable_werror_flag.go
  24. disable_werror_flag_test.go
  25. env.go
  26. errors.go
  27. errors_test.go
  28. gcc_flags.go
  29. gcc_flags_test.go
  30. goldenutil_test.go
  31. gomacc_flag.go
  32. gomacc_flag_test.go
  33. main.go
  34. oldwrapper.go
  35. oldwrapper_test.go
  36. pie_flags.go
  37. pie_flags_test.go
  38. print_cmdline_flag.go
  39. print_cmdline_flag_test.go
  40. print_config_flag.go
  41. print_config_flag_test.go
  42. README.md
  43. rusage_flag.go
  44. rusage_flag_test.go
  45. sanitizer_flags.go
  46. sanitizer_flags_test.go
  47. stackprotector_flags.go
  48. stackprotector_flags_test.go
  49. sysroot_flag.go
  50. sysroot_flag_test.go
  51. testutil_test.go
  52. thumb_flags.go
  53. thumb_flags_test.go
  54. unsupported_flags.go
  55. unsupported_flags_test.go
  56. x64_flags.go
  57. x64_flags_test.go
compiler_wrapper/README.md

Compiler wrapper

See the comments on the top of main.go. Build is split into 2 steps via separate commands:

  • bundle: copies the sources and the build.py file into a folder.
  • build: builds the actual go binary, assuming it is executed from the folder created by bundle.py.

This allows to copy the sources to a ChromeOS / Android package, including the build script, and then build from there without a dependency on toolchain-utils itself.