BUILD 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. load("install.bzl", "install_path_rule")
  5. # Turns `--//installers/local:install_path=arg` into `$(INSTALL_PATH)`.
  6. install_path_rule(
  7. name = "install_path",
  8. build_setting_default = "/usr",
  9. )
  10. sh_binary(
  11. name = "install",
  12. srcs = ["install.sh"],
  13. args = [
  14. "--install_path",
  15. "$(INSTALL_PATH)",
  16. "--carbon",
  17. "$(location :carbon)",
  18. "$(locations //explorer:standard_libraries)",
  19. ],
  20. data = [
  21. ":carbon",
  22. "//explorer:standard_libraries",
  23. ],
  24. toolchains = [":install_path"],
  25. )
  26. sh_binary(
  27. name = "uninstall",
  28. srcs = ["uninstall.sh"],
  29. args = [
  30. "--install_path",
  31. "$(INSTALL_PATH)",
  32. ],
  33. toolchains = [":install_path"],
  34. )
  35. # A busybox-like binary for Carbon tools; multiple tools are part of this binary
  36. # so that shared code is deduplicated.
  37. cc_binary(
  38. name = "carbon",
  39. srcs = ["carbon.cpp"],
  40. visibility = ["//bazel/check_deps:__pkg__"],
  41. deps = [
  42. "//explorer:main",
  43. "@llvm-project//llvm:Support",
  44. ],
  45. )