You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

targets.go 637 B

11 months ago
1234567891011121314151617181920212223242526272829303132333435
  1. package targets
  2. import (
  3. "gitlink.org.cn/cloudream/common/magefiles"
  4. )
  5. // [配置项]设置编译平台为windows
  6. func Win() {
  7. magefiles.Global.OS = "win"
  8. }
  9. // [配置项]设置编译平台为linux
  10. func Linux() {
  11. magefiles.Global.OS = "linux"
  12. }
  13. // [配置项]设置编译架构为amd64
  14. func AMD64() {
  15. magefiles.Global.Arch = "amd64"
  16. }
  17. // [配置项]设置编译架构为arm64
  18. func ARM64() {
  19. magefiles.Global.Arch = "arm64"
  20. }
  21. // [配置项]设置编译的根目录
  22. func BuildRoot(dir string) {
  23. magefiles.Global.BuildRoot = dir
  24. }
  25. // [配置项]关闭编译优化,用于调试
  26. func Debug() {
  27. magefiles.Global.Debug = true
  28. }