harvey.BUILD 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. CMD_DEPS = [
  2. "//sys/src/libavl:libavl",
  3. "//sys/src/libcomplete:libcomplete",
  4. "//sys/src/libcontrol:libcontrol",
  5. "//sys/src/libdisk:libdisk",
  6. "//sys/src/libflate:libflate",
  7. "//sys/src/libframe:libframe",
  8. "//sys/src/libgeometry:libgeometry",
  9. "//sys/src/libhttpd:libhttpd",
  10. "//sys/src/libbin:libbin",
  11. "//sys/src/liblex:liblex",
  12. "//sys/src/libmemdraw:libmemdrawiprint",
  13. "//sys/src/libmemlayer:libmemlayer",
  14. "//sys/src/libmemdraw:libmemdraw",
  15. "//sys/src/libdraw:libdraw",
  16. "//sys/src/libplumb:libplumb",
  17. "//sys/src/libregexp:libregexp",
  18. "//sys/src/libstdio:libstdio",
  19. "//sys/src/libString:libString",
  20. "//sys/src/liboventi:liboventi",
  21. "//sys/src/lib9p:lib9p",
  22. "//sys/src/libauth:libauth",
  23. "//sys/src/libauthsrv:libauthsrv",
  24. "//sys/src/libndb:libndb",
  25. "//sys/src/libip:libip",
  26. "//sys/src/libventi:libventi",
  27. "//sys/src/libsec:libsec",
  28. "//sys/src/libmp:libmp",
  29. "//sys/src/libthread:libthread",
  30. "//sys/src/libmach:libmach",
  31. "//sys/src/libbio:libbio",
  32. "//sys/src/libc:libc",
  33. ]
  34. CMD_LINK_OPTS = [
  35. "-static",
  36. "-e_main",
  37. ]
  38. KLIB_COMPILER_FLAGS = [
  39. "-mcmodel=kernel",
  40. "-O0",
  41. "-mno-red-zone",
  42. "-ffreestanding",
  43. "-fno-builtin",
  44. "-Wall",
  45. "-Wno-missing-braces",
  46. "-Wno-parentheses",
  47. "-Wno-unknown-pragmas",
  48. "-Wuninitialized",
  49. "-g",
  50. ]
  51. LIB_COMPILER_FLAGS = [
  52. "-std=c11",
  53. "-fasm",
  54. "-c",
  55. "-ffreestanding",
  56. "-fno-builtin",
  57. "-fno-omit-frame-pointer",
  58. "-g",
  59. "-gdwarf-2",
  60. "-ggdb",
  61. "-mcmodel=small",
  62. "-mno-red-zone",
  63. "-O0",
  64. "-static",
  65. "-Wall",
  66. "-Wno-missing-braces",
  67. "-Wno-parentheses",
  68. "-Wno-unknown-pragmas"
  69. ]
  70. harvey_binary = cc_binary(
  71. copts=LIB_COMPILER_FLAGS,
  72. includes=[
  73. "//sys/include",
  74. "//amd64/include",
  75. ],
  76. deps=CMD_DEPS,
  77. strip=true,
  78. linkopts=CMD_LINK_OPTS
  79. )